Closed nxdefiant closed 1 year ago
I was wondering why the Compass on my Bangle.js 2, firmware 2v16.11 gives only two different values no matter the orientation:
>Bangle.getCompass().z =257 >Bangle.getCompass().z =514
and I found an odd statement in jswrap_bangle.c#L1208
I assume (without having read the datasheet) it should read offset 5 & 6, not 5 & 5: mag.z = buf[6] | (buf[5]<<8);
mag.z = buf[6] | (buf[5]<<8);
Wow, good spot - thanks! I guess I tested x/y because that's what is used for heading, but not Z - I'll get that fixed
I was wondering why the Compass on my Bangle.js 2, firmware 2v16.11 gives only two different values no matter the orientation:
and I found an odd statement in jswrap_bangle.c#L1208
I assume (without having read the datasheet) it should read offset 5 & 6, not 5 & 5:
mag.z = buf[6] | (buf[5]<<8);