From 78675ebb3b39449b8ccfc09aed5c834b78aae802 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 a5112d791be1..d4616bacef38 100644 --- a/app/src/keymap.c +++ b/app/src/keymap.c @@ -781,10 +781,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, }; } @@ -809,6 +810,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]; @@ -824,6 +826,7 @@ static int keymap_handle_commit(void) { } } } +#endif return 0; }