summaryrefslogtreecommitdiffstats
path: root/keyboards/keychron/bluetooth/indicator.c
diff options
context:
space:
mode:
authorlalalademaxiya1 <2831039915@qq.com>2023-03-15 16:51:53 +0800
committerlalalademaxiya1 <2831039915@qq.com>2023-03-15 16:51:53 +0800
commitc6243da12f6643747a24a7aa761e103cc4a848c2 (patch)
tree82d29a9567d09c2d3845654c7e5b16b284b2bc30 /keyboards/keychron/bluetooth/indicator.c
parentee715fc26ade41e56f47e60527f17d5cbdfb584b (diff)
Update Keychron K Pro series keyboards
Diffstat (limited to 'keyboards/keychron/bluetooth/indicator.c')
-rwxr-xr-x[-rw-r--r--]keyboards/keychron/bluetooth/indicator.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/keyboards/keychron/bluetooth/indicator.c b/keyboards/keychron/bluetooth/indicator.c
index fa111817dd..d4644dbd0c 100644..100755
--- a/keyboards/keychron/bluetooth/indicator.c
+++ b/keyboards/keychron/bluetooth/indicator.c
@@ -403,7 +403,7 @@ void indicator_battery_low_backlit_enable(bool enable) {
}
/* Indicating at first time or after the interval */
if ((rtc_time == 0 || t - rtc_time > LOW_BAT_LED_TRIG_INTERVAL) && bat_low_ind_state == 0) {
- bat_low_backlit_indicator = enable ? (timer_read32() | 1) : 0;
+ bat_low_backlit_indicator = enable ? (timer_read32() == 0 ? 1 : timer_read32()) : 0;
rtc_time = rtc_timer_read_ms();
bat_low_ind_state = 1;
@@ -448,7 +448,7 @@ void indicator_battery_low(void) {
bat_low_ind_state |= 0x80;
}
- bat_low_backlit_indicator = sync_timer_read32() | 1;
+ bat_low_backlit_indicator = sync_timer_read32() == 0 ? 1 : sync_timer_read32();
/* Restore backligth state */
if ((bat_low_ind_state & 0x0F) > (LOW_BAT_LED_BLINK_TIMES)) {