Skip to content

Commit

Permalink
Add ability to turn off heartbeat LED blinking (#3674)
Browse files Browse the repository at this point in the history
* Add ability to turn off status LED blinking

Fixes #3635 and depends on [protobufs PR #485](meshtastic/protobufs#485)

Signed-off-by: Andrew Yong <[email protected]>

* led_heartbeat_disabled

* trunk

---------

Signed-off-by: Andrew Yong <[email protected]>
Co-authored-by: Ben Meadors <[email protected]>
  • Loading branch information
ndoo and thebentern authored Apr 22, 2024
1 parent 8b5fad2 commit 250cf16
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,11 @@ const char *getDeviceName()

static int32_t ledBlinker()
{
// Still set up the blinking (heartbeat) interval but skip code path below, so LED will blink if
// config.device.led_heartbeat_disabled is changed
if (config.device.led_heartbeat_disabled)
return 1000;

static bool ledOn;
ledOn ^= 1;

Expand Down Expand Up @@ -1001,4 +1006,4 @@ void loop()
mainDelay.delay(delayMsec);
}
// if (didWake) LOG_DEBUG("wake!\n");
}
}

0 comments on commit 250cf16

Please sign in to comment.