From 892167f3db7b40a99208862d6a8fe1ab3d95eae1 Mon Sep 17 00:00:00 2001 From: "[null]" Date: Wed, 19 Apr 2017 19:32:27 -0500 Subject: [PATCH 1/2] sleep_led only on when breathing_table != 0 Allow sleep_led animation to completely turn off the LED when breathing_table value is 0 instead of continuing to PWM it. --- common/avr/sleep_led.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/avr/sleep_led.c b/common/avr/sleep_led.c index 37c2cf1b..4b1cfd99 100644 --- a/common/avr/sleep_led.c +++ b/common/avr/sleep_led.c @@ -92,7 +92,7 @@ ISR(TIMER1_COMPA_vect) timer.row++; // LED on - if (timer.pwm.count == 0) { + if (timer.pwm.count == 0 && pgm_read_byte(&breathing_table[timer.pwm.index]) != 0 ) { sleep_led_on(); } // LED off From 85060390387aa62ef6cf74c17a678c9953d28db3 Mon Sep 17 00:00:00 2001 From: "[null]" Date: Wed, 19 Apr 2017 19:35:48 -0500 Subject: [PATCH 2/2] sleep_led only on when breathing_table != 0 Allow sleep_led animation to completely turn off the LED when breathing_table value is 0 instead of continuing to PWM it. --- common/chibios/sleep_led.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common/chibios/sleep_led.c b/common/chibios/sleep_led.c index 4c35cfcb..a28d0508 100644 --- a/common/chibios/sleep_led.c +++ b/common/chibios/sleep_led.c @@ -62,7 +62,7 @@ OSAL_IRQ_HANDLER(TIMER_INTERRUPT_VECTOR) { timer.row++; // LED on - if (timer.pwm.count == 0) { + if (timer.pwm.count == 0 && breathing_table[timer.pwm.index] != 0 ) { led_set(1<