Create GT911 Touchscreen component (#4027)
Co-authored-by: clydebarrow <2366188+clydebarrow@users.noreply.github.com>
This commit is contained in:
@@ -18,6 +18,11 @@ void Touchscreen::set_display(display::Display *display) {
|
||||
}
|
||||
}
|
||||
|
||||
void Touchscreen::send_release_() {
|
||||
for (auto *listener : this->touch_listeners_)
|
||||
listener->release();
|
||||
}
|
||||
|
||||
void Touchscreen::send_touch_(TouchPoint tp) {
|
||||
ESP_LOGV(TAG, "Touch (x=%d, y=%d)", tp.x, tp.y);
|
||||
this->touch_trigger_.trigger(tp);
|
||||
|
||||
@@ -41,6 +41,7 @@ class Touchscreen {
|
||||
protected:
|
||||
/// Call this function to send touch points to the `on_touch` listener and the binary_sensors.
|
||||
void send_touch_(TouchPoint tp);
|
||||
void send_release_();
|
||||
|
||||
uint16_t display_width_;
|
||||
uint16_t display_height_;
|
||||
|
||||
Reference in New Issue
Block a user