7static const char *
const TAG =
"pulse_width";
11 const uint32_t now =
micros();
20 LOG_SENSOR(
"",
"Pulse Width",
this)
21 LOG_UPDATE_INTERVAL(
this)
22 LOG_PIN(
" Pin: ", this->
pin_);
26 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.
Providing packet encoding functions for exchanging data with a remote host.
uint32_t IRAM_ATTR HOT micros()