Fix force publication debug output

This commit is contained in:
bzi 2019-03-08 20:23:34 +01:00
parent ac81705a29
commit c96ab157c1
1 changed files with 5 additions and 3 deletions

View File

@ -129,8 +129,10 @@ void publish (Sensor &sensor){
}
// force an update if the number of samples without update is exceeded
Serial.println(" * Forcing publication if sensor value is plausible");
force = sensor.lastUpdate >= FORCE_PERIOD;
if (force) {
Serial.println(" * Forcing publication if sensor value is plausible");
}
// update the sample counter, will be reset if sample is published
sensor.lastUpdate += 1;