mirror of
https://github.com/meshtastic/firmware.git
synced 2026-01-27 04:02:05 +00:00
WIP kinda works but light sleep still busted
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user