Skip to content

Commit 660e484

Browse files
Akubiuser2684
authored andcommitted
Conditional report review (#419)
1 parent 078bdad commit 660e484

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

nodemanager/Child.cpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -149,8 +149,6 @@ void Child::sendValue(bool force) {
149149
else {
150150
// if the value does not differ enough from the previous one, do not send the value
151151
if (_value > (_last_value - _value_delta) && _value < (_last_value + _value_delta)) {
152-
// keep track of the previous value
153-
_last_value = _value;
154152
return;
155153
}
156154
}
@@ -159,8 +157,6 @@ void Child::sendValue(bool force) {
159157
else {
160158
// if a delta is configured, do not report if the string is the same as the previous one
161159
if (_value_delta > 0 && strcmp(_value_string, _last_value_string) == 0) {
162-
// keep track of the previous value
163-
_last_value_string = _value_string;
164160
return;
165161
}
166162
}
@@ -207,6 +203,7 @@ void Child::reset() {
207203
void Child::setForceUpdateTimerValue(unsigned long value) {
208204
_force_update_timer->setMode(TIME_INTERVAL);
209205
_force_update_timer->setValue(value*60);
206+
_force_update_timer->start();
210207
}
211208
void Child::setMinThreshold(float value) {
212209
_min_threshold = value;

0 commit comments

Comments
 (0)