mirror of
https://github.com/MarekZegare4/MeshCore-Solo.git
synced 2026-11-01 10:21:59 +00:00
While the loop task is inside a display refresh (seconds on a big e-ink panel) the CardKB isn't polled, and the keyboard's own one-key buffer drops every press but the last. A small FreeRTOS task polls the CardKB every 10 ms while a refresh is in progress, into a 16-entry queue that the loop drains afterwards. A mutex guards the shared Wire1 bus against querySensors(). The task is created after the screens so its stack doesn't starve their allocations, and the loop falls back to the old direct polling if it can't be created. Tested on hardware: Wio Tracker L1 + CardKB, several quick presses during an 800x480 refresh all arrive. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KxAZVAbhhYr18Dd4guTQM1