Skip to content

Commit

Permalink
#839 - Changed back to Uint8Array, Int8 was wrong ;)
Browse files Browse the repository at this point in the history
  • Loading branch information
graphefruit committed Nov 14, 2024
1 parent 50219a2 commit 8683a99
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ android {
applicationId "com.beanconqueror.app"
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 80001
versionCode 80002
versionName "8.0.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
aaptOptions {
Expand Down
4 changes: 2 additions & 2 deletions src/classes/devices/variaAku.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,13 +98,13 @@ export class VariaAkuScale extends BluetoothScale {
VariaAkuScale.SERVICE_UUID,
VariaAkuScale.CHAR_UUID,
async (_data: any) => {
this.parseStatusUpdate(new Int8Array(_data));
this.parseStatusUpdate(new Uint8Array(_data));
},
(_data: any) => {}
);
}

private async parseStatusUpdate(rawStatus: Int8Array) {
private async parseStatusUpdate(rawStatus: Uint8Array) {
if (rawStatus[1] === 0x01) {
const sign: number = (rawStatus[3] & 0x10) === 0 ? 1 : -1;
const actualData =
Expand Down

0 comments on commit 8683a99

Please sign in to comment.