6static const char *
const TAG =
"pulse_width";
19 LOG_SENSOR(
"",
"Pulse Width",
this);
20 LOG_UPDATE_INTERVAL(
this);
21 LOG_PIN(
" Pin: ", this->
pin_);
25 ESP_LOGCONFIG(TAG,
"'%s' - Got pulse width %.3f s", this->
name_.
c_str(), width);
constexpr const char * c_str() const
void dump_config() override
PulseWidthSensorStore store_
Store data in a class that doesn't use multiple-inheritance (vtables in flash)
volatile uint32_t last_rise_
float get_pulse_width_s() const
static void gpio_intr(PulseWidthSensorStore *arg)
volatile uint32_t last_width_
void publish_state(float state)
Publish a new state to the front-end.
uint32_t IRAM_ATTR HOT micros()