mirror of
https://github.com/esphome/esphome.git
synced 2025-09-28 08:02:23 +01:00
bot comments
This commit is contained in:
@@ -20,6 +20,9 @@ namespace esp32_ble_server_automations {
|
||||
using namespace esp32_ble;
|
||||
using namespace event_emitter;
|
||||
|
||||
// Invalid listener ID constant - 0 is used as sentinel value in EventEmitter
|
||||
static constexpr EventEmitterListenerID INVALID_LISTENER_ID = 0;
|
||||
|
||||
class BLETriggers {
|
||||
public:
|
||||
static Trigger<std::vector<uint8_t>, uint16_t> *create_characteristic_on_write_trigger(
|
||||
@@ -50,7 +53,7 @@ class BLECharacteristicSetValueActionManager
|
||||
return entry.listener_id;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
return INVALID_LISTENER_ID;
|
||||
}
|
||||
void emit_pre_notify(BLECharacteristic *characteristic) {
|
||||
this->emit_(BLECharacteristicSetValueActionEvt::PRE_NOTIFY, characteristic);
|
||||
|
Reference in New Issue
Block a user