Skip to content

Commit

Permalink
rebase fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
ReFil committed Jan 11, 2025
1 parent fbeb01b commit 7d8f2e2
Showing 1 changed file with 12 additions and 16 deletions.
28 changes: 12 additions & 16 deletions app/src/split/bluetooth/central.c
Original file line number Diff line number Diff line change
Expand Up @@ -647,6 +647,15 @@ static uint8_t split_central_chrc_discovery_func(struct bt_conn *conn,
LOG_DBG("Found select physical layout handle");
slot->selected_physical_layout_handle = bt_gatt_attr_value_handle(attr);
k_work_submit(&update_peripherals_selected_layouts_work);
} else if (!bt_uuid_cmp(((struct bt_gatt_chrc *)attr->user_data)->uuid,
BT_UUID_DECLARE_128(ZMK_SPLIT_BT_CHAR_UPDATE_LED_UUID))) {
LOG_DBG("Found update led handle");
slot->update_led_handle = bt_gatt_attr_value_handle(attr);
} else if (!bt_uuid_cmp(((struct bt_gatt_chrc *)attr->user_data)->uuid,
BT_UUID_DECLARE_128(ZMK_SPLIT_BT_CHAR_UPDATE_BL_UUID))) {
LOG_DBG("Found update bl handle");
slot->update_bl_handle = bt_gatt_attr_value_handle(attr);

#if IS_ENABLED(CONFIG_ZMK_SPLIT_PERIPHERAL_HID_INDICATORS)
} else if (!bt_uuid_cmp(((struct bt_gatt_chrc *)attr->user_data)->uuid,
BT_UUID_DECLARE_128(ZMK_SPLIT_BT_UPDATE_HID_INDICATORS_UUID))) {
Expand Down Expand Up @@ -717,22 +726,9 @@ static uint8_t split_central_chrc_discovery_func(struct bt_conn *conn,
break;
}



else if (!bt_uuid_cmp(((struct bt_gatt_chrc *)attr->user_data)->uuid,
BT_UUID_DECLARE_128(ZMK_SPLIT_BT_CHAR_UPDATE_LED_UUID))) {
LOG_DBG("Found update led handle");
slot->update_led_handle = bt_gatt_attr_value_handle(attr);
}
else if (!bt_uuid_cmp(((struct bt_gatt_chrc *)attr->user_data)->uuid,
BT_UUID_DECLARE_128(ZMK_SPLIT_BT_CHAR_UPDATE_BL_UUID))) {
LOG_DBG("Found update bl handle");
slot->update_bl_handle = bt_gatt_attr_value_handle(attr);
}

bool subscribed = (slot->update_bl_handle && slot->update_led_handle && slot->run_behavior_handle &&
slot->subscribe_params.value_handle &&
slot->selected_physical_layout_handle);
bool subscribed =
(slot->update_bl_handle && slot->update_led_handle && slot->run_behavior_handle &&
slot->subscribe_params.value_handle && slot->selected_physical_layout_handle);
#if ZMK_KEYMAP_HAS_SENSORS
subscribed = subscribed && slot->sensor_subscribe_params.value_handle;
#endif /* ZMK_KEYMAP_HAS_SENSORS */
Expand Down

0 comments on commit 7d8f2e2

Please sign in to comment.