diff options
author | lalalademaxiya1 <2831039915@qq.com> | 2023-03-02 17:31:35 +0800 |
---|---|---|
committer | lalalademaxiya1 <2831039915@qq.com> | 2023-03-02 17:31:35 +0800 |
commit | 09c270ab0db52ad8564cc35952a243551860ea21 (patch) | |
tree | 1c6b6517651f460b9b612e3492a56c2392134d69 /keyboards/keychron/bluetooth/factory_test.c | |
parent | 77f3d1738b6c9cba7aa7aae840200317a2bad73e (diff) |
Add some new boards
Added k1_pro, k5_pro, k9_pro, k13_pro, q2_pro and q3_pro.
Diffstat (limited to 'keyboards/keychron/bluetooth/factory_test.c')
-rw-r--r-- | keyboards/keychron/bluetooth/factory_test.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/keyboards/keychron/bluetooth/factory_test.c b/keyboards/keychron/bluetooth/factory_test.c index b42d2bde36..9de130a26b 100644 --- a/keyboards/keychron/bluetooth/factory_test.c +++ b/keyboards/keychron/bluetooth/factory_test.c @@ -69,7 +69,7 @@ static uint8_t factory_reset_ind_state = 0; static bool report_os_sw_state = false; void factory_timer_start(void) { - factory_reset_timer = sync_timer_read32() | 1; + factory_reset_timer = sync_timer_read32() == 0 ? 1 : sync_timer_read32(); } static inline void factory_timer_check(void) { @@ -77,7 +77,7 @@ static inline void factory_timer_check(void) { factory_reset_timer = 0; if (factory_reset_state == KEY_PRESS_FACTORY_RESET) { - factory_reset_ind_timer = sync_timer_read32() | 1; + factory_reset_ind_timer = sync_timer_read32() == 0 ? 1 : sync_timer_read32(); factory_reset_ind_state++; layer_state_t default_layer_tmp = default_layer_state; @@ -114,7 +114,7 @@ static inline void factory_reset_ind_timer_check(void) { if (factory_reset_ind_state++ > 6) { factory_reset_ind_timer = factory_reset_ind_state = 0; } else { - factory_reset_ind_timer = sync_timer_read32() | 1; + factory_reset_ind_timer = sync_timer_read32() == 0 ? 1 : sync_timer_read32(); } } } @@ -187,7 +187,7 @@ bool led_matrix_indicators_user(void) { led_matrix_set_value_all(factory_reset_ind_state % 2 ? 0 : 255); } - return false; + return true; } #endif @@ -213,7 +213,7 @@ bool rgb_matrix_indicators_user(void) { } } - return false; + return true; } #endif |