diff options
Diffstat (limited to 'firmware/backlight.c')
-rw-r--r-- | firmware/backlight.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/firmware/backlight.c b/firmware/backlight.c index 97c9175a4b..a84fc8b280 100644 --- a/firmware/backlight.c +++ b/firmware/backlight.c | |||
@@ -137,7 +137,7 @@ static inline void __backlight_off(void) | |||
137 | 137 | ||
138 | #if defined(CONFIG_BACKLIGHT) && !defined(BOOTLOADER) | 138 | #if defined(CONFIG_BACKLIGHT) && !defined(BOOTLOADER) |
139 | 139 | ||
140 | const char backlight_timeout_value[19] = | 140 | const signed char backlight_timeout_value[19] = |
141 | { | 141 | { |
142 | -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 15, 20, 25, 30, 45, 60, 90 | 142 | -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 15, 20, 25, 30, 45, 60, 90 |
143 | }; | 143 | }; |
@@ -522,9 +522,10 @@ void backlight_off(void) | |||
522 | queue_post(&backlight_queue, BACKLIGHT_OFF, NULL); | 522 | queue_post(&backlight_queue, BACKLIGHT_OFF, NULL); |
523 | } | 523 | } |
524 | 524 | ||
525 | /* returns true when the backlight is on OR when it's set to always off */ | ||
525 | bool is_backlight_on(void) | 526 | bool is_backlight_on(void) |
526 | { | 527 | { |
527 | if (backlight_timer || !backlight_get_current_timeout()) | 528 | if (backlight_timer || backlight_get_current_timeout() <= 0) |
528 | return true; | 529 | return true; |
529 | else | 530 | else |
530 | return false; | 531 | return false; |
@@ -615,9 +616,11 @@ int remote_backlight_get_current_timeout(void) | |||
615 | #endif | 616 | #endif |
616 | } | 617 | } |
617 | 618 | ||
619 | /* returns true when the backlight is on OR when it's set to always off */ | ||
618 | bool is_remote_backlight_on(void) | 620 | bool is_remote_backlight_on(void) |
619 | { | 621 | { |
620 | if (remote_backlight_timer != 0 || !remote_backlight_get_current_timeout()) | 622 | if (remote_backlight_timer != 0 || |
623 | remote_backlight_get_current_timeout() <= 0) | ||
621 | return true; | 624 | return true; |
622 | else | 625 | else |
623 | return false; | 626 | return false; |