From d3dfe6205c33e697a9ee0102490b97a8fa9db4be Mon Sep 17 00:00:00 2001 From: stefanbode Date: Mon, 12 Oct 2020 12:08:40 +0200 Subject: [PATCH] Prevent crashes on high counter pulse. e.g. AC-Dimmer, Current-Counter... I had reproducible Hardware Watchdog resets and hangs with the AC-Dimmer, but only if the 100Hz from the main hammered the device. I found this help and change the code. Now the AC-Dimmer is ON for >3days. I assume this change is responsible because it was the only change. --- tasmota/settings.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasmota/settings.h b/tasmota/settings.h index 868e84778..09b09b455 100644 --- a/tasmota/settings.h +++ b/tasmota/settings.h @@ -673,7 +673,7 @@ typedef struct { uint8_t ota_loader; // 293 unsigned long energy_kWhtoday; // 294 unsigned long energy_kWhtotal; // 298 - unsigned long pulse_counter[MAX_COUNTERS]; // 29C + volatile unsigned long pulse_counter[MAX_COUNTERS]; // 29C power_t power; // 2AC EnergyUsage energy_usage; // 2B0 unsigned long nextwakeup; // 2C8