Skip to content

Commit fd94d53

Browse files
author
Victor Mataré
committed
fix watchdog ping
Commit #d395107 didn't fix the whole issue, we also need to subtract the sleeptime now instead of adding it. Otherwise we'd always ping the watchdog sleeptime seconds too late. Thanks to github user @susanwl for spotting this.
1 parent 5b5a547 commit fd94d53

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/drivers.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ void TpFanDriver::ping_watchdog_and_depulse(const Level *level)
144144
std::this_thread::sleep_for(depulse_);
145145
set_speed(level);
146146
}
147-
else if (last_watchdog_ping_ + watchdog_ + sleeptime <= std::chrono::system_clock::now())
147+
else if (last_watchdog_ping_ + watchdog_ - sleeptime <= std::chrono::system_clock::now())
148148
set_speed(level);
149149
}
150150

0 commit comments

Comments
 (0)