Skip to content

Commit

Permalink
Patch to stop the 2-minutely spinup while preventing watchdog reset
Browse files Browse the repository at this point in the history
Cf. issue vmatare#114
  • Loading branch information
tova-cup committed Sep 1, 2024
1 parent b1ad819 commit ebc4556
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/fans.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,11 @@ void TpFanDriver::ping_watchdog_and_depulse(const Level &level)
}
else if (last_watchdog_ping_ + watchdog_ - sleeptime <= std::chrono::system_clock::now()) {
log(TF_DBG) << "Watchdog ping" << flush;
set_speed(level);
std::fstream f(path_);
if (!(f.is_open() && f.good()))
throw IOerror(MSG_FAN_INIT(path_), errno);
if (!(f << "watchdog " << watchdog_.count() << std::flush))
throw IOerror(MSG_FAN_INIT(path_), errno);
}
}

Expand Down

0 comments on commit ebc4556

Please sign in to comment.