Refactor main loop touch flow and update docs
This commit is contained in:
@@ -10,7 +10,6 @@
|
||||
|
||||
// External interrupt flags from basic1.cpp
|
||||
extern volatile bool touch_interrupt_flag;
|
||||
extern volatile bool touch_event_down;
|
||||
extern volatile bool button_key0_pressed;
|
||||
extern volatile bool button_key1_pressed;
|
||||
|
||||
|
||||
@@ -37,9 +37,9 @@ public:
|
||||
InputManager(LowLevelTouch* touch, const GameConfig* config);
|
||||
|
||||
/**
|
||||
* @brief Process touch input from controller
|
||||
* @param last_time Pointer to last touch timestamp for debouncing
|
||||
* @return InputEvent (valid=false if no valid input)
|
||||
* @brief Process touch input using hybrid IRQ + active-session sampling.
|
||||
* @param last_time Pointer to last touch timestamp (0 means no active touch session)
|
||||
* @return InputEvent (valid=false if no state change/update is emitted)
|
||||
*/
|
||||
InputEvent process_touch_input(uint32_t* last_time);
|
||||
|
||||
@@ -97,6 +97,8 @@ public:
|
||||
private:
|
||||
LowLevelTouch* touch;
|
||||
const GameConfig* config;
|
||||
// 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;
|
||||
|
||||
// Virtual button regions
|
||||
|
||||
Reference in New Issue
Block a user