mirror of
https://github.com/arendst/Tasmota.git
synced 2025-07-23 10:46:31 +00:00
Berry 'display.touch_update' wrongly applies resistive calibration (#23363)
This commit is contained in:
parent
f72a989976
commit
a4ce9efd2c
@ -21,6 +21,7 @@ All notable changes to this project will be documented in this file.
|
|||||||
### Fixed
|
### Fixed
|
||||||
- Berry `bytes().asstring()` now truncates a string if buffer contains NULL (#23311)
|
- Berry `bytes().asstring()` now truncates a string if buffer contains NULL (#23311)
|
||||||
- Berry string literals containing NULL are truncated (#23312)
|
- Berry string literals containing NULL are truncated (#23312)
|
||||||
|
- Berry `display.touch_update` wrongly applies resistive calibration
|
||||||
|
|
||||||
### Removed
|
### Removed
|
||||||
|
|
||||||
|
@ -75,7 +75,7 @@ extern "C" {
|
|||||||
|
|
||||||
void be_ntv_display_touch_update(int32_t touches, int32_t raw_x, int32_t raw_y, int32_t gesture) {
|
void be_ntv_display_touch_update(int32_t touches, int32_t raw_x, int32_t raw_y, int32_t gesture) {
|
||||||
#if defined(USE_UNIVERSAL_TOUCH) || defined(USE_FT5206) || defined(USE_XPT2046) || defined(USE_GT911) || defined(USE_LILYGO47) || defined(USE_TOUCH_BUTTONS)
|
#if defined(USE_UNIVERSAL_TOUCH) || defined(USE_FT5206) || defined(USE_XPT2046) || defined(USE_GT911) || defined(USE_LILYGO47) || defined(USE_TOUCH_BUTTONS)
|
||||||
Touch_SetStatus(touches, raw_x, raw_y, gesture);
|
Touch_SetStatus(touches, raw_x, raw_y, gesture,true /*don't convert*/);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -82,14 +82,16 @@ bool utouch_found = false;
|
|||||||
VButton *buttons[MAX_TOUCH_BUTTONS];
|
VButton *buttons[MAX_TOUCH_BUTTONS];
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void Touch_SetStatus(uint8_t touches, uint16_t raw_x, uint16_t raw_y, uint8_t gesture) {
|
void Touch_SetStatus(uint8_t touches, uint16_t raw_x, uint16_t raw_y, uint8_t gesture, bool force_no_convert) {
|
||||||
TSGlobal.external_ts = true;
|
TSGlobal.external_ts = true;
|
||||||
TSGlobal.gesture = gesture;
|
TSGlobal.gesture = gesture;
|
||||||
TSGlobal.touches = touches;
|
TSGlobal.touches = touches;
|
||||||
TSGlobal.touched = (TSGlobal.touches > 0);
|
TSGlobal.touched = (TSGlobal.touches > 0);
|
||||||
TSGlobal.touch_xp = TSGlobal.raw_touch_xp = raw_x;
|
TSGlobal.touch_xp = TSGlobal.raw_touch_xp = raw_x;
|
||||||
TSGlobal.touch_yp = TSGlobal.raw_touch_yp = raw_y;
|
TSGlobal.touch_yp = TSGlobal.raw_touch_yp = raw_y;
|
||||||
TS_RotConvert(&TSGlobal.touch_xp, &TSGlobal.touch_yp);
|
if (!force_no_convert) {
|
||||||
|
TS_RotConvert(&TSGlobal.touch_xp, &TSGlobal.touch_yp);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// return true if succesful, false if not configured
|
// return true if succesful, false if not configured
|
||||||
|
Loading…
x
Reference in New Issue
Block a user