Skip to content

Commit

Permalink
Merge pull request #189 from MartinHugh/LEDtask_optimisation
Browse files Browse the repository at this point in the history
Set_Blue_LED_optimisation
  • Loading branch information
ligenxxxx authored Mar 1, 2024
2 parents cea7f2c + 9f29c63 commit 24cd719
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions src/hardware.c
Original file line number Diff line number Diff line change
Expand Up @@ -1515,11 +1515,15 @@ void LED_Task() {

void Set_Blue_LED(uint8_t flag) {
if (flag) {
LED_BLUE_ON;
led_status = ON;
if (led_status == OFF) {
LED_BLUE_ON;
led_status = ON;
}
} else {
LED_BLUE_OFF;
led_status = OFF;
if (led_status == ON) {
LED_BLUE_OFF;
led_status = OFF;
}
}
}

Expand Down

0 comments on commit 24cd719

Please sign in to comment.