diff --git a/app/src/split/bluetooth/central.c b/app/src/split/bluetooth/central.c index ee21a12f..61ec4e8d 100644 --- a/app/src/split/bluetooth/central.c +++ b/app/src/split/bluetooth/central.c @@ -29,6 +29,7 @@ LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL); #include #include #include +#include static int start_scanning(void); @@ -712,6 +713,8 @@ static void split_central_connected(struct bt_conn *conn, uint8_t conn_err) { confirm_peripheral_slot_conn(conn); split_central_process_connection(conn); + raise_zmk_split_peripheral_status_changed( + (struct zmk_split_peripheral_status_changed){.connected = true}); } static void split_central_disconnected(struct bt_conn *conn, uint8_t reason) { @@ -728,6 +731,8 @@ static void split_central_disconnected(struct bt_conn *conn, uint8_t reason) { k_msgq_put(&peripheral_batt_lvl_msgq, &ev, K_NO_WAIT); k_work_submit(&peripheral_batt_lvl_work); #endif // IS_ENABLED(CONFIG_ZMK_SPLIT_BLE_CENTRAL_BATTERY_LEVEL_FETCHING) + raise_zmk_split_peripheral_status_changed( + (struct zmk_split_peripheral_status_changed){.connected = false}); err = release_peripheral_slot_for_conn(conn);