WIP kinda works but light sleep still busted

This commit is contained in:
geeksville
2020-02-22 13:50:08 -08:00
parent c7894f3bc5
commit fe2ca65a11
6 changed files with 32 additions and 21 deletions

View File

@@ -339,7 +339,8 @@ void loop()
static bool wasPressed = false;
static uint32_t minPressMs; // what tick should we call this press long enough
static uint32_t lastPingMs;
if (!digitalRead(BUTTON_PIN))
if (!digitalRead(BUTTON_PIN))
{
if (!wasPressed)
{ // just started a new press
@@ -373,7 +374,7 @@ void loop()
// ESP.restart();
}
}
#endif
#endif
// No GPS lock yet, let the OS put the main CPU in low power mode for 100ms (or until another interrupt comes in)
// i.e. don't just keep spinning in loop as fast as we can.