From a9de8b9bb33b35fdcf08d4f1ce34457b43950c05 Mon Sep 17 00:00:00 2001 From: Kevin Hester Date: Mon, 12 Oct 2020 09:33:15 +0800 Subject: [PATCH] oops - only read axp on boards that have it --- src/Power.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Power.cpp b/src/Power.cpp index 731bf7c7..12a63811 100644 --- a/src/Power.cpp +++ b/src/Power.cpp @@ -138,6 +138,7 @@ int32_t Power::runOnce() { readPowerStatus(); +#ifdef TBEAM_V10 // WE no longer use the IRQ line to wake the CPU (due to false wakes from sleep), but we do poll // the IRQ status by reading the registers over I2C axp.readIRQ(); @@ -170,6 +171,7 @@ int32_t Power::runOnce() } */ axp.clearIRQ(); +#endif // Only read once every 20 seconds once the power status for the app has been initialized return (statusHandler && statusHandler->isInitialized()) ? (1000 * 20) : RUN_SAME;