Skip to content

Commit

Permalink
use biasing only if temperature >= 0 °C
Browse files Browse the repository at this point in the history
  • Loading branch information
vmatare committed Apr 16, 2021
1 parent 040f63f commit 38018ed
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/thinkfan.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,9 @@ void TemperatureState::restart()

void TemperatureState::add_temp(int t)
{
int diff = t - *temp_;
int diff = *temp_ >= 0 ?
t - *temp_
: 0;
*temp_ = t;

if (unlikely(diff > 2)) {
Expand Down

0 comments on commit 38018ed

Please sign in to comment.