Skip to content

Commit

Permalink
Adc bugfix (#1328)
Browse files Browse the repository at this point in the history
  • Loading branch information
rds76 authored Nov 28, 2022
1 parent ec96b72 commit 4afb4a9
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions main/ZsensorADC.ino
Original file line number Diff line number Diff line change
Expand Up @@ -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>();
Expand Down

0 comments on commit 4afb4a9

Please sign in to comment.