8 #include <esp_gattc_api.h> 18 namespace airthings_wave_base {
22 static const uint8_t ACCESS_CONTROL_POINT_COMMAND = 0x6d;
32 esp_ble_gattc_cb_param_t *param)
override;
48 virtual void read_sensors(uint8_t *raw_value, uint16_t value_len) = 0;
virtual void read_sensors(uint8_t *raw_value, uint16_t value_len)=0
sensor::Sensor * humidity_sensor_
void set_pressure(sensor::Sensor *pressure)
bool request_read_values_()
sensor::Sensor * tvoc_sensor_
void set_response_timeout_()
bool read_battery_next_update_
uint32_t battery_update_interval_
This class simplifies creating components that periodically check a state.
uint8_t responses_pending_
void set_humidity(sensor::Sensor *humidity)
sensor::Sensor * temperature_sensor_
void set_battery_update_interval(uint32_t interval)
void response_received_()
espbt::ESPBTUUID access_control_point_characteristic_uuid_
bool is_valid_voc_value_(uint16_t voc)
void read_battery_(uint8_t *raw_value, uint16_t value_len)
void set_temperature(sensor::Sensor *temperature)
static ESPBTUUID from_uint16(uint16_t uuid)
sensor::Sensor * battery_voltage_
espbt::ESPBTUUID sensors_data_characteristic_uuid_
espbt::ESPBTUUID service_uuid_
void gattc_event_handler(esp_gattc_cb_event_t event, esp_gatt_if_t gattc_if, esp_ble_gattc_cb_param_t *param) override
sensor::Sensor * pressure_sensor_
void set_tvoc(sensor::Sensor *tvoc)
Implementation of SPI Controller mode.
Base-class for all sensors.
AirthingsWaveBase()=default
void set_battery_voltage(sensor::Sensor *voltage)