This commit is contained in:
2026-05-26 14:23:19 +02:00
parent 52bab32309
commit 87cba0b419
10 changed files with 421 additions and 15 deletions

View File

@@ -10,6 +10,7 @@
#include <zephyr/logging/log.h>
#include "ble_mgmt.h"
#include "event_mgmt.h"
LOG_MODULE_REGISTER(ble_mgmt, CONFIG_BLE_MGMT_LOG_LEVEL);
@@ -239,6 +240,8 @@ static void connected(struct bt_conn *conn, uint8_t err)
if (peer_count() < CONFIG_BT_MAX_CONN) {
(void)start_advertising();
}
event_mgmt_set_event(EVENT_MGMT_BLE_CONNECTED);
}
static void disconnected(struct bt_conn *conn, uint8_t reason)
@@ -252,6 +255,8 @@ static void disconnected(struct bt_conn *conn, uint8_t reason)
if (peer_count() < CONFIG_BT_MAX_CONN) {
(void)start_advertising();
}
event_mgmt_set_event(EVENT_MGMT_BLE_DISCONNECTED);
}
BT_CONN_CB_DEFINE(conn_callbacks) = {