From 44956866f84d707e3f5c49fb97ecef118768d269 Mon Sep 17 00:00:00 2001 From: Peter Johanson Date: Tue, 13 Aug 2024 03:30:39 -0600 Subject: [PATCH] fix: Fixes for CRC16 local IDs. --- app/src/keymap.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/app/src/keymap.c b/app/src/keymap.c index 4578919a8b09..ce906fd2613f 100644 --- a/app/src/keymap.c +++ b/app/src/keymap.c @@ -821,10 +821,11 @@ static int keymap_handle_set(const char *name, size_t len, settings_read_cb read binding_setting.behavior_local_id); } - zmk_keymap[layer][key_position] = (struct zmk_behavior_binding){ + zmk_keymap[layer][key_position] = (struct zmk_behavior_binding) { +#if IS_ENABLED(CONFIG_ZMK_BEHAVIOR_LOCAL_IDS_IN_BINDINGS) .local_id = binding_setting.behavior_local_id, - .behavior_dev = name, - .param1 = binding_setting.param1, +#endif + .behavior_dev = name, .param1 = binding_setting.param1, .param2 = binding_setting.param2, }; } @@ -849,6 +850,7 @@ static int keymap_handle_set(const char *name, size_t len, settings_read_cb read }; static int keymap_handle_commit(void) { +#if IS_ENABLED(CONFIG_ZMK_BEHAVIOR_LOCAL_IDS_IN_BINDINGS) for (int l = 0; l < ZMK_KEYMAP_LAYERS_LEN; l++) { for (int p = 0; p < ZMK_KEYMAP_LEN; p++) { struct zmk_behavior_binding *binding = &zmk_keymap[l][p]; @@ -864,6 +866,7 @@ static int keymap_handle_commit(void) { } } } +#endif return 0; }