Repository navigation
companion: keep mesh/BLE running during e-ink refresh - #3724
akalinin-softvelum wants to merge 2 commits into
Conversation
Use GxEPD2's busy callback to run the mesh, interface and sensor loops (loopCore(), shared with loop()) while the panel refreshes, instead of blocking the main loop. Covers the partial refresh in endFrame(), the full wipe in startFrame(), and the sleep icon / blank refresh on turnOff().
|
Seems nice (still need to give it some tests), thanks for the PR ... Could you add a new build flag to better identify than with DISPLAY_CLASS the builds for which this would be used (something like EINK_REFRESH_LOOP) so we don't build this into every target that uses DISPLAY_CLASS @ripplebiz do you have any issue with stripping out some portion of the loop so it can be used why waiting in this specific case of active wait ? edit: gave it a try and it seems to work well |
Only builds that define EINK_REFRESH_LOOP install the busy hook; for now the T-Echo companion BLE/USB envs.
|
Done: the hook is now enabled only with |
|
Nice, I prefer getting an eye from @ripplebiz about the loop before merging it (and I'll probably add the m1, m5 and m8) I actually tested on M5 and it worked as expected |
Implements #3701. While the e-ink panel refreshes, GxEPD2's busy callback now runs the mesh/interface/sensor loop (
loopCore(), shared withloop(), the "inner loop" suggested in #3701), so radio and BLE don't stall during a redraw. Covers the partial refresh, the full wipe and theturnOff()refresh (sleep icon / blank). Other display drivers are unchanged (setBusyHook()is a no-op by default).Tested on my T-Echo (dev + #3687, companion USB), CLI reply latency while the screen redraws:
max_partial 0, 71 ms with a full wipe every 3 framesThe
turnOff()part was added during the rebase onto #3687 and is only build-tested. Builds OK: T-Echo BLE/USB, ThinkNode M8 BLE, RAK4631 BLE.@fdlamotte