Skip to content

Commit

Permalink
Store touch coordinates in signed values - fix espruino/BangleApps#2181
Browse files Browse the repository at this point in the history
  • Loading branch information
gfwilliams committed Oct 20, 2022
1 parent d4a1cf9 commit 9417086
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions libs/banglejs/jswrap_bangle.c
Original file line number Diff line number Diff line change
Expand Up @@ -648,11 +648,11 @@ JshI2CInfo i2cInternal;
#endif

#ifdef TOUCH_DEVICE
unsigned char touchX, touchY; ///< current touch event coordinates
unsigned char lastTouchX, lastTouchY; ///< last touch event coordinates - updated when JSBT_DRAG is fired
short touchX, touchY; ///< current touch event coordinates
short lastTouchX, lastTouchY; ///< last touch event coordinates - updated when JSBT_DRAG is fired
bool touchPts, lastTouchPts; ///< whether a fnger is currently touching or not
unsigned char touchType; ///< variable to differentiate press, long press, double press
unsigned char touchMinX = 0, touchMinY = 0, touchMaxX = 160, touchMaxY = 160; ///< touchscreen calibration values (what we expect from hardware, then we map this to LCD_WIDTH/HEIGHT)
short touchMinX = 0, touchMinY = 0, touchMaxX = 160, touchMaxY = 160; ///< touchscreen calibration values (what we expect from hardware, then we map this to LCD_WIDTH/HEIGHT)
#endif

#ifdef PRESSURE_DEVICE
Expand Down

0 comments on commit 9417086

Please sign in to comment.