oops - only read axp on boards that have it

1.2-legacy
Kevin Hester 2020-10-12 09:33:15 +08:00
rodzic 66a7f896c8
commit a9de8b9bb3
1 zmienionych plików z 2 dodań i 0 usunięć

Wyświetl plik

@ -138,6 +138,7 @@ int32_t Power::runOnce()
{ {
readPowerStatus(); 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 // 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 // the IRQ status by reading the registers over I2C
axp.readIRQ(); axp.readIRQ();
@ -170,6 +171,7 @@ int32_t Power::runOnce()
} }
*/ */
axp.clearIRQ(); axp.clearIRQ();
#endif
// Only read once every 20 seconds once the power status for the app has been initialized // Only read once every 20 seconds once the power status for the app has been initialized
return (statusHandler && statusHandler->isInitialized()) ? (1000 * 20) : RUN_SAME; return (statusHandler && statusHandler->isInitialized()) ? (1000 * 20) : RUN_SAME;