Skip to content

Commit

Permalink
Fix jswrap_bangle.c merge error
Browse files Browse the repository at this point in the history
  • Loading branch information
gfwilliams committed Sep 27, 2023
1 parent 138452f commit 1019e76
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions libs/banglejs/jswrap_bangle.c
Original file line number Diff line number Diff line change
Expand Up @@ -1281,16 +1281,6 @@ void peripheralPollHandler() {
mag.x = (magRaw[1] * (128+magCalib[1])) >> 5;
mag.z = (magRaw[2] * (128+magCalib[2])) >> 5;
#ifdef LCD_ROTATION
int16_t magRaw[3];
magRaw[0] = buf[1] | (buf[2]<<8);
magRaw[1] = buf[3] | (buf[4]<<8);
magRaw[2] = buf[5] | (buf[6]<<8);
// no sign extend because magRaw is 16 bit signed already
// apply calibration
mag.y = magRaw[0] * (128+magCalib[0]) >> 7; // x/y are swapped
mag.x = magRaw[1] * (128+magCalib[1]) >> 7;
mag.z = magRaw[2] * (128+magCalib[2]) >> 7;

#if LCD_ROTATION == 180
mag.y = -mag.y;
mag.x = -mag.x;
Expand Down

0 comments on commit 1019e76

Please sign in to comment.