mirror of
https://github.com/esphome/esphome.git
synced 2024-11-27 17:27:59 +01:00
no conversion to resolution
This commit is contained in:
parent
b12f260620
commit
b33d398fd1
1 changed files with 3 additions and 0 deletions
|
@ -97,6 +97,9 @@ void Touchscreen::add_raw_touch_position_(uint8_t id, int16_t x_raw, int16_t y_r
|
|||
if (this->conversion_to_resolution_) {
|
||||
tp.x = (uint16_t) ((int) x * this->display_width_ / 0x1000);
|
||||
tp.y = (uint16_t) ((int) y * this->display_height_ / 0x1000);
|
||||
} else {
|
||||
tp.x = (uint16_t) (int) x;
|
||||
tp.y = (uint16_t) (int) y;
|
||||
}
|
||||
} else {
|
||||
tp.state |= STATE_CALIBRATE;
|
||||
|
|
Loading…
Reference in a new issue