mirror of
https://github.com/Threnklyn/esphome-dev.git
synced 2026-06-05 20:38:27 +02:00
Fix for noise in pulse_counter and duty_cycle components (#2646)
This commit is contained in:
committed by
GitHub
parent
d8b3af3815
commit
d54b4e7c44
@@ -65,7 +65,8 @@ class PulseCounterSensor : public sensor::Sensor, public PollingComponent {
|
||||
protected:
|
||||
InternalGPIOPin *pin_;
|
||||
PulseCounterStorage storage_;
|
||||
uint32_t current_total_ = 0;
|
||||
uint32_t last_time_{0};
|
||||
uint32_t current_total_{0};
|
||||
sensor::Sensor *total_sensor_;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user