Skip to content

Commit

Permalink
Touch fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
thinkyhead committed Nov 23, 2023
1 parent ded942a commit 60f0a63
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions Marlin/src/lcd/touch/touch_buttons.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,12 @@ uint8_t TouchButtons::read_buttons() {
no_touch = true;
return 0;
}
x = int16_t((int32_t(x) * _TOUCH_CALIBRATION_X) >> 16) + _TOUCH_OFFSET_X;
y = int16_t((int32_t(y) * _TOUCH_CALIBRATION_Y) >> 16) + _TOUCH_OFFSET_Y;
#else
x = uint16_t((uint32_t(x) * _TOUCH_CALIBRATION_X) >> 16) + _TOUCH_OFFSET_X;
y = uint16_t((uint32_t(y) * _TOUCH_CALIBRATION_Y) >> 16) + _TOUCH_OFFSET_Y;
#endif
x = uint16_t((uint32_t(x) * _TOUCH_CALIBRATION_X) >> 16) + _TOUCH_OFFSET_X;
y = uint16_t((uint32_t(y) * _TOUCH_CALIBRATION_Y) >> 16) + _TOUCH_OFFSET_Y;

#elif ENABLED(TFT_TOUCH_DEVICE_GT911)

Expand Down

0 comments on commit 60f0a63

Please sign in to comment.