diff --git a/keyboards/keychron/bluetooth/factory_test.c b/keyboards/keychron/bluetooth/factory_test.c index ebf5f4fef6c0..0dce8f93b34a 100644 --- a/keyboards/keychron/bluetooth/factory_test.c +++ b/keyboards/keychron/bluetooth/factory_test.c @@ -14,6 +14,8 @@ * along with this program. If not, see . */ +#if defined(ENABLE_FACTORY_TEST) + #include "quantum.h" #include "raw_hid.h" #ifdef KC_BLUETOOTH_ENABLE @@ -330,6 +332,7 @@ void factory_test_rx(uint8_t *data, uint8_t length) { } } +#if !defined(KEYCHRON_DIP_SWITCH_USER) bool dip_switch_update_user(uint8_t index, bool active) { if (report_os_sw_state) { #ifdef INVERT_OS_SWITCH_STATE @@ -341,3 +344,6 @@ bool dip_switch_update_user(uint8_t index, bool active) { return true; } +#endif + +#endif //ENABLE_FACTORY_TEST diff --git a/keyboards/keychron/q3_pro/q3_pro.c b/keyboards/keychron/q3_pro/q3_pro.c index 6c47334e72bd..72980268f01f 100644 --- a/keyboards/keychron/q3_pro/q3_pro.c +++ b/keyboards/keychron/q3_pro/q3_pro.c @@ -64,12 +64,12 @@ static void pairing_key_timer_cb(void *arg) { #ifdef DIP_SWITCH_ENABLE bool dip_switch_update_kb(uint8_t index, bool active) { +#if !defined(KEYCHRON_DIP_SWITCH_USER) if (index == 0) { default_layer_set(1UL << (active ? 2 : 0)); } - dip_switch_update_user(index, active); - - return true; +#endif + return dip_switch_update_user(index, active); } #endif