Skip to content

Commit f67ba9f

Browse files
Fix build errors
1 parent aa89b67 commit f67ba9f

File tree

3 files changed

+11
-4
lines changed

3 files changed

+11
-4
lines changed

keyboards/keyboard_quantizer/kqb/config.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
#define BMP_FORCE_SAFE_MODE false
1111
#define DISABLE_MSC 1
1212

13+
#define COMBO_COUNT 32
1314

1415
/* key matrix size */
1516
#define MATRIX_ROWS_DEFAULT 24

keyboards/keyboard_quantizer/kqb/rules.mk

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,5 @@ MCU_LDSCRIPT = nrf52840_kqb
66
MCU = cortex-m4
77

88
RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow
9+
COMBO_ENABLE = yes
910

tmk_core/protocol/nrf/bmp_config.c

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,11 @@ static char macro_string[1024];
3838
bmp_ex_keycode_t bmp_ex_keycodes[BMP_EX_KC_LEN];
3939
uint32_t bmp_ex_keycode_num;
4040

41+
#ifndef COMBO_COUNT
42+
# define COMBO_COUNT 0
43+
uint16_t COMBO_LEN;
44+
#endif
45+
4146
extern combo_t key_combos[COMBO_COUNT];
4247
extern uint16_t COMBO_LEN;
4348
uint16_t combo_members[COMBO_COUNT][3];
@@ -566,6 +571,10 @@ int save_tapping_term_file() { return BMPAPI->app.save_file(QMK_RECORD); }
566571
void convert_exkc_combo() {
567572
uint8_t combo_count = 0;
568573
for (int idx = 0; idx < bmp_ex_keycode_num; idx++) {
574+
if (combo_count >= COMBO_COUNT) {
575+
break;
576+
}
577+
569578
if (get_exkc_type(&bmp_ex_keycodes[idx]) != CMB) {
570579
continue;
571580
}
@@ -576,10 +585,6 @@ void convert_exkc_combo() {
576585
key_combos[combo_count].keycode = cmb_get_kc3(&bmp_ex_keycodes[idx]);
577586

578587
combo_count++;
579-
580-
if (combo_count >= COMBO_COUNT) {
581-
break;
582-
}
583588
}
584589

585590
COMBO_LEN = combo_count;

0 commit comments

Comments
 (0)