File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -74,14 +74,15 @@ namespace Controller{
7474 uint32_t interval = varAccX.getInt (fInterval , i);
7575 uint64_t lastRun = varAccX.getInt (fLastRun , i);
7676 uint32_t waitTime = varAccX.getInt (fWaitTime , i);
77- if (!lastRun || (interval && (lastRun + interval < now))) {
77+ if (!lastRun || (interval && (lastRun + interval <= now))) {
7878 // Set the wait time to the interval, or 1 second if it is less than 1 second
7979 if (!waitTime) { waitTime = interval; }
8080 if (waitTime < 1000 ) { waitTime = 1000 ; }
8181 if (!runVariableTarget (name, target, waitTime)) {
8282 if (interval && now + interval < nextCheck) { nextCheck = now + interval; }
8383 }
8484 } else {
85+ // Set the wait time to the next run for this variable (if less than current wait time)
8586 if (interval && lastRun + interval < nextCheck) { nextCheck = lastRun + interval; }
8687 }
8788 }
You can’t perform that action at this time.
0 commit comments