You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The track and rest session loops have no delay or change-detection guard. Every iteration calls Touch.LiveScreen(), which clears and transfers the complete 240×240 RGB565 framebuffer even though the displayed timer generally changes only once per second.
This wastes CPU and power, repeatedly reconfigures the touch controller, and increases SPI/I²C contention during the most important runtime state.
Relevant locations
main.py, track-session loop
main.py, rest-session loop
touch_drive.py, LiveScreen
lcd_1inch28.py, show
Acceptance criteria
Redraw only when the displayed second, warning state, or another visible value changes.
Add a bounded loop delay or use a monotonic scheduling approach.
Continue checking stop/clear gestures responsively between redraws.
Avoid rewriting touch-controller mode on every frame when the mode is unchanged.
Measure and document expected refresh/input responsiveness on hardware.
Add a test confirming redraw count remains bounded for a simulated session.
The live session loop now polls gestures every 50 ms but transfers the framebuffer only when a displayed second, warning state, or another visible value changes. The CST816T mode is cached, eliminating repeated mode writes.
Validation: 48 host tests passed; a real three-second session produced three redraws and 49 input checks; full redraws measured 56.2–65.4 ms; worst-case input-check latency measured approximately 115 ms. The connected timer is running the merged implementation.
Activity
PurpleSentinel commentedon Aug 9, 2026
Resolved and hardware-verified by #17 (
25aecfc).The live session loop now polls gestures every 50 ms but transfers the framebuffer only when a displayed second, warning state, or another visible value changes. The CST816T mode is cached, eliminating repeated mode writes.
Validation: 48 host tests passed; a real three-second session produced three redraws and 49 input checks; full redraws measured 56.2–65.4 ms; worst-case input-check latency measured approximately 115 ms. The connected timer is running the merged implementation.