Adc bugfix (#1328)

This commit is contained in:
Radim authored and GitHub committed 2022-11-28 11:35:11 -06:00
1 parent ec96b72d96
commit 4afb4a972f
1 file changed
+1
+1
View File
@@ -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<JSON_MSG_BUFFER> jsonBuffer;
JsonObject ADCdata = jsonBuffer.to<JsonObject>();