GT911 touchscreen: Fix bug causing touch button release to fail (#6042)

* Fix bug causing gt911 touch button release to fail

* Cache button state and report changes only
This commit is contained in:
Clyde Stubbs
2023-12-31 21:01:16 +11:00
committed by GitHub
parent 2a43e55452
commit 773cd0f414
2 changed files with 9 additions and 7 deletions
@@ -26,6 +26,7 @@ class GT911Touchscreen : public touchscreen::Touchscreen, public i2c::I2CDevice
InternalGPIOPin *interrupt_pin_{};
std::vector<GT911ButtonListener *> button_listeners_;
uint8_t button_state_{0xFF}; // last button state. Initial FF guarantees first update.
};
} // namespace gt911