Skip to content

Commit

Permalink
Always switch the status LEDs on each half-tick.
Browse files Browse the repository at this point in the history
  • Loading branch information
blakesmith committed Jul 1, 2018
1 parent 9899831 commit cc8824f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions clock/src/ui.cc
Original file line number Diff line number Diff line change
Expand Up @@ -73,13 +73,15 @@ void UI::toggle_status_led() {
if (led_tick_) {
status_led_->ToggleOk();
status_led_->ToggleError();
} else {
status_led_->SetOk(true);
status_led_->SetError(false);
}
}

void UI::toggle_led_tick() {
led_tick_ = !led_tick_;
status_led_->SetOk(true);
status_led_->SetError(false);
toggle_status_led();
}

bool UI::is_next_second(const uint8_t current_second) {
Expand Down

0 comments on commit cc8824f

Please sign in to comment.