Corrected magnetic field Z negative encoding

master
jeffyactive 2021-12-17 15:40:22 -05:00
parent d9d5926416
commit c93bbe4fb8
1 changed files with 2 additions and 2 deletions

View File

@ -196,8 +196,8 @@ function encodeMagServiceData() {
if(yEncoded < 0) { if(yEncoded < 0) {
yEncoded += 0x10000; yEncoded += 0x10000;
} }
if(yEncoded < 0) { if(zEncoded < 0) {
yEncoded += 0x10000; zEncoded += 0x10000;
} }
let x = [ xEncoded & 0xff, (xEncoded >> 8) & 0xff ]; let x = [ xEncoded & 0xff, (xEncoded >> 8) & 0xff ];