re-advertise on disconnect

This commit is contained in:
leo 2023-06-15 16:45:00 +02:00
parent c496f27222
commit 0dbf5aae0e
Signed by: leo
GPG Key ID: 0DD993BFB2B307DB

View File

@ -225,6 +225,9 @@ static int ble_gap_event(struct ble_gap_event *event, void* arg){
else
conn_handle = event->connect.conn_handle;
break;
case BLE_GAP_EVENT_DISCONNECT:
ble_advertise();
break;
case BLE_GAP_EVENT_SUBSCRIBE:
ESP_LOGI(TAG, "Subscribe %d", event->subscribe.attr_handle);
for(int i = 0; i < INPUTS_NUM; i++){