Skip to content

Commit

Permalink
fix: Fix missed event manager usages from refactor.
Browse files Browse the repository at this point in the history
  • Loading branch information
petejohanson committed Jan 14, 2024
1 parent 644feeb commit 7aa93c4
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
3 changes: 1 addition & 2 deletions app/src/hid_indicators.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,7 @@ zmk_hid_indicators_t zmk_hid_indicators_get_profile(struct zmk_endpoint_instance
static void raise_led_changed_event(struct k_work *_work) {
const zmk_hid_indicators_t indicators = zmk_hid_indicators_get_current_profile();

ZMK_EVENT_RAISE(new_zmk_hid_indicators_changed(
(struct zmk_hid_indicators_changed){.indicators = indicators}));
raise_zmk_hid_indicators_changed((struct zmk_hid_indicators_changed){.indicators = indicators});

#if IS_ENABLED(CONFIG_ZMK_SPLIT_PERIPHERAL_HID_INDICATORS) && IS_ENABLED(CONFIG_ZMK_SPLIT_BLE)
zmk_split_bt_update_hid_indicator(indicators);
Expand Down
2 changes: 1 addition & 1 deletion app/src/split/bluetooth/central.c
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ void peripheral_batt_lvl_change_callback(struct k_work *work) {
while (k_msgq_get(&peripheral_batt_lvl_msgq, &ev, K_NO_WAIT) == 0) {
LOG_DBG("Triggering peripheral battery level change %u", ev.state_of_charge);
peripheral_battery_levels[ev.source] = ev.state_of_charge;
ZMK_EVENT_RAISE(new_zmk_peripheral_battery_state_changed(ev));
raise_zmk_peripheral_battery_state_changed(ev);
}
}

Expand Down
4 changes: 2 additions & 2 deletions app/src/split/bluetooth/service.c
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,8 @@ static zmk_hid_indicators_t hid_indicators = 0;

static void split_svc_update_indicators_callback(struct k_work *work) {
LOG_DBG("Raising HID indicators changed event: %x", hid_indicators);
ZMK_EVENT_RAISE(new_zmk_hid_indicators_changed(
(struct zmk_hid_indicators_changed){.indicators = hid_indicators}));
raise_zmk_hid_indicators_changed(
(struct zmk_hid_indicators_changed){.indicators = hid_indicators});
}

static K_WORK_DEFINE(split_svc_update_indicators_work, split_svc_update_indicators_callback);
Expand Down

0 comments on commit 7aa93c4

Please sign in to comment.