fix(radio): keep the radio serviced while an e-ink refresh blocks the loop

GxEPD2 polls the panel's BUSY pin for the whole refresh (up to ~1-2s),
stalling the main loop. A TX finishing in that window left the SX126x in
standby -- deaf -- until the refresh ended; packets received meanwhile could
be lost (only the latest is readable, and a later CRC failure rejects a good
one still pending). Hook GxEPD2's busy callback to finish TX / drain RX into
a small staging queue and re-arm right away, without touching dispatch/UI.
Wired only where the display driver supports it (GxEPD2: the two e-ink Solo
boards); OLED and sim builds are unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Jakub
2026-09-24 15:21:38 +02:00
co-authored by Claude Opus 5.5
parent 81cee3846f
commit 22eba3c244
13 changed files with 184 additions and 16 deletions
+4
View File
@@ -84,6 +84,10 @@ bool GxEPDDisplay::begin() {
SPI1.begin();
#endif
display.init(115200, true, 2, false);
// Runs ~every 1ms while _waitWhileBusy() polls the panel's BUSY pin, i.e.
// for as long as a refresh blocks the main loop. See busyCallbackTrampoline
// and callBusyPump()/setBusyPumpFn() (DisplayDriver.h).
display.epd2.setBusyCallback(busyCallbackTrampoline, this);
display.setRotation(DISPLAY_ROTATION);
setTextSize(1);
display.setPartialWindow(0, 0, display.width(), display.height());