diff --git a/src/graphics/niche/Drivers/EInk/EInk.cpp b/src/graphics/niche/Drivers/EInk/EInk.cpp index bdb69bff8..cd2e9dc98 100644 --- a/src/graphics/niche/Drivers/EInk/EInk.cpp +++ b/src/graphics/niche/Drivers/EInk/EInk.cpp @@ -33,7 +33,6 @@ void EInk::beginPolling(uint32_t interval, uint32_t expectedDuration) updateRunning = true; pollingInterval = interval; pollingBegunAt = millis(); - pollingExpectedDuration = expectedDuration; // To minimize load, we can choose to delay polling for a few seconds, if we know roughly how long the update will take // By default, expectedDuration is 0, and we'll start polling immediately @@ -47,7 +46,8 @@ void EInk::beginPolling(uint32_t interval, uint32_t expectedDuration) int32_t EInk::runOnce() { // Check for polling timeout - if (millis() - pollingBegunAt > pollingExpectedDuration * 3) + // Manually set at 10 seconds, in case some big task holds up the firmware's cooperative multitasking + if (millis() - pollingBegunAt > 10000) failed = true; // Handle failure diff --git a/src/graphics/niche/Drivers/EInk/EInk.h b/src/graphics/niche/Drivers/EInk/EInk.h index da81f6b4f..3c51d4f1d 100644 --- a/src/graphics/niche/Drivers/EInk/EInk.h +++ b/src/graphics/niche/Drivers/EInk/EInk.h @@ -50,7 +50,6 @@ class EInk : private concurrency::OSThread bool updateRunning = false; // see EInk::busy() uint32_t pollingInterval = 0; // How often to check if update complete (ms) uint32_t pollingBegunAt = 0; // To timeout during polling - uint32_t pollingExpectedDuration = 0; // To timeout during polling }; } // namespace NicheGraphics::Drivers