diff --git a/tasmota/xsns_01_counter.ino b/tasmota/xsns_01_counter.ino index 3dfbdfaaf..0af9ee8a3 100644 --- a/tasmota/xsns_01_counter.ino +++ b/tasmota/xsns_01_counter.ino @@ -44,6 +44,9 @@ struct COUNTER { bool any_counter = false; } Counter; +uint32_t last_cycle; +uint32_t cycle_time; + #ifndef ARDUINO_ESP8266_RELEASE_2_3_0 // Fix core 2.5.x ISR not in IRAM Exception void CounterUpdate(uint8_t index) ICACHE_RAM_ATTR; void CounterUpdate1(void) ICACHE_RAM_ATTR; @@ -75,7 +78,32 @@ void CounterUpdate(uint8_t index) Counter.timer_low_high[index] = time; Counter.pin_state ^= (1<