mirror of
https://github.com/esphome/esphome.git
synced 2025-09-06 13:22:19 +01:00
Fixes for BLE/improv (#1878)
This commit is contained in:
@@ -119,24 +119,24 @@ bool ESP32BLE::ble_setup_() {
|
||||
return true;
|
||||
}
|
||||
|
||||
void ESP32BLE::loop() {
|
||||
BLEEvent *ble_event = this->ble_events_.pop();
|
||||
while (ble_event != nullptr) {
|
||||
switch (ble_event->type_) {
|
||||
case ble_event->GATTS:
|
||||
this->real_gatts_event_handler_(ble_event->event_.gatts.gatts_event, ble_event->event_.gatts.gatts_if,
|
||||
&ble_event->event_.gatts.gatts_param);
|
||||
break;
|
||||
case ble_event->GAP:
|
||||
this->real_gap_event_handler_(ble_event->event_.gap.gap_event, &ble_event->event_.gap.gap_param);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
delete ble_event;
|
||||
ble_event = this->ble_events_.pop();
|
||||
}
|
||||
}
|
||||
// void ESP32BLE::loop() {
|
||||
// BLEEvent *ble_event = this->ble_events_.pop();
|
||||
// while (ble_event != nullptr) {
|
||||
// switch (ble_event->type_) {
|
||||
// case ble_event->GATTS:
|
||||
// this->real_gatts_event_handler_(ble_event->event_.gatts.gatts_event, ble_event->event_.gatts.gatts_if,
|
||||
// &ble_event->event_.gatts.gatts_param);
|
||||
// break;
|
||||
// case ble_event->GAP:
|
||||
// this->real_gap_event_handler_(ble_event->event_.gap.gap_event, &ble_event->event_.gap.gap_param);
|
||||
// break;
|
||||
// default:
|
||||
// break;
|
||||
// }
|
||||
// delete ble_event;
|
||||
// ble_event = this->ble_events_.pop();
|
||||
// }
|
||||
// }
|
||||
|
||||
void ESP32BLE::gap_event_handler(esp_gap_ble_cb_event_t event, esp_ble_gap_cb_param_t *param) {
|
||||
global_ble->real_gap_event_handler_(event, param);
|
||||
|
Reference in New Issue
Block a user