mirror of
https://github.com/MarekZegare4/MeshCore-Solo.git
synced 2026-11-02 02:41:57 +00:00
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:
@@ -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());
|
||||
|
||||
Reference in New Issue
Block a user