Reduce touch overhead and cap frame rate at 24 FPS

This commit is contained in:
Adolfo Reyna
2026-02-18 15:53:48 -05:00
parent 73a78069e3
commit fe6e403a98
4 changed files with 26 additions and 9 deletions

View File

@@ -97,6 +97,8 @@ public:
private:
LowLevelTouch* touch;
const GameConfig* config;
// Last time we sampled touch over I2C while a touch session is active.
uint32_t last_touch_sample_ms = 0;
// Consecutive touch_count==0 samples while a touch session is active.
// Used to suppress false TOUCH_UP events from transient touch controller jitter.
uint8_t no_touch_samples = 0;