Skip to content

Commit

Permalink
fix: Fixes for CRC16 local IDs.
Browse files Browse the repository at this point in the history
  • Loading branch information
petejohanson committed Aug 27, 2024
1 parent 0a2c36c commit 98076a8
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions app/src/keymap.c
Original file line number Diff line number Diff line change
Expand Up @@ -816,10 +816,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,
};
}
Expand All @@ -844,6 +845,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];
Expand All @@ -859,6 +861,7 @@ static int keymap_handle_commit(void) {
}
}
}
#endif

return 0;
}
Expand Down

0 comments on commit 98076a8

Please sign in to comment.