From 4afb4a972f0ce1e7dbbde048c1aaecdc08600839 Mon Sep 17 00:00:00 2001 From: Radim Date: Mon, 28 Nov 2022 18:35:11 +0100 Subject: [PATCH] Adc bugfix (#1328) --- main/ZsensorADC.ino | 1 + 1 file changed, 1 insertion(+) diff --git a/main/ZsensorADC.ino b/main/ZsensorADC.ino index 9ad1d92c03..fd8c87497c 100644 --- a/main/ZsensorADC.ino +++ b/main/ZsensorADC.ino @@ -61,6 +61,7 @@ void MeasureADC() { Log.error(F("Failed to read from ADC !" CR)); } else { if (val >= persistedadc + ThresholdReadingADC || val <= persistedadc - ThresholdReadingADC || (MinTimeInSecBetweenPublishingADC > 0 && millis() > (timeadcpub + (MinTimeInSecBetweenPublishingADC * 1000UL)))) { + timeadcpub = millis(); Log.trace(F("Creating ADC buffer" CR)); StaticJsonDocument jsonBuffer; JsonObject ADCdata = jsonBuffer.to();