Skip to content

Commit

Permalink
✨ (bootloader): LEDs blink only when charging
Browse files Browse the repository at this point in the history
  • Loading branch information
YannLocatelli committed Mar 17, 2022
1 parent 510ed33 commit 5385931
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app/bootloader/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -86,11 +86,11 @@ void blinkHighEnergy()
auto main() -> int
{
while (battery.level() < 0 + battery_level_hysteresis_offset) {
if (battery.voltage() < 8.0) {
if (battery.isCharging() && battery.voltage() < 8.0) {
blinkLowEnergy();
} else if (battery.voltage() < CoreBattery::Capacity::empty) {
} else if (battery.isCharging() && battery.voltage() < CoreBattery::Capacity::empty) {
blinkMediumEnergy();
} else {
} else if (battery.isCharging()) {
blinkHighEnergy();
}

Expand Down

0 comments on commit 5385931

Please sign in to comment.