28 void setup()
override;
57 void play(
const Ts &...
x)
override { this->
parent_->calibrate_zero(); }
62 void play(
const Ts &...
x)
override { this->
parent_->abc_enable(); }
67 void play(
const Ts &...
x)
override { this->
parent_->abc_disable(); }
74 void play(
const Ts &...
x)
override { this->
parent_->range_set(this->detection_range_.value(
x...)); }
virtual void play(const Ts &...x)=0
Helper class to easily give an object a parent of type T.
This class simplifies creating components that periodically check a state.
void play(const Ts &...x) override
void play(const Ts &...x) override
void play(const Ts &...x) override
void set_abc_enabled(bool abc_enabled)
void set_detection_range(MHZ19DetectionRange detection_range)
void dump_config() override
MHZ19DetectionRange detection_range_
float get_setup_priority() const override
sensor::Sensor * temperature_sensor_
sensor::Sensor * co2_sensor_
bool mhz19_write_command_(const uint8_t *command, uint8_t *response)
void set_temperature_sensor(sensor::Sensor *temperature_sensor)
void range_set(MHZ19DetectionRange detection_ppm)
MHZ19ABCLogic abc_boot_logic_
void set_warmup_seconds(uint32_t seconds)
void set_co2_sensor(sensor::Sensor *co2_sensor)
TEMPLATABLE_VALUE(MHZ19DetectionRange, detection_range) void play(const Ts &...x) override
Base-class for all sensors.
@ MHZ19_DETECTION_RANGE_0_10000PPM
@ MHZ19_DETECTION_RANGE_0_5000PPM
@ MHZ19_DETECTION_RANGE_0_2000PPM
@ MHZ19_DETECTION_RANGE_DEFAULT
Providing packet encoding functions for exchanging data with a remote host.