diff options
author | lalalademaxiya1 <66767061+lalalademaxiya1@users.noreply.github.com> | 2023-03-16 16:48:17 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-16 16:48:17 +0800 |
commit | 8ab6b59ccadf3b6d7a064b1b51f4a2aef073ad38 (patch) | |
tree | 94af982a3db9626b064431da6d8dcc332224b4fc /keyboards/keychron/bluetooth/indicator.c | |
parent | 77cbe1469a6a83ef00a5eaffce318a176bfacdd4 (diff) | |
parent | 0f35f0e2ed1343765422bc9abf4fe240768b4130 (diff) |
Merge pull request #108 from lalalademaxiya1/bt_playground
Update Keychron K Pro series keyboards
Diffstat (limited to 'keyboards/keychron/bluetooth/indicator.c')
-rwxr-xr-x[-rw-r--r--] | keyboards/keychron/bluetooth/indicator.c | 4 |
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)) { |