Skip to content

Commit

Permalink
Merge pull request #58 from onsah/fix_fan_too_low_warning_message
Browse files Browse the repository at this point in the history
fix: fan too low warning message
  • Loading branch information
AaronErhardt authored Jan 24, 2024
2 parents f1db479 + c4c8281 commit f7fb6e4
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions tailord/src/fancontrol/profile.rs
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,13 @@ impl FanProfile {
51..=255 => (value.temp - 50).saturating_mul(2).min(100),
};
if min_speed > value.fan {
let invalid_fan_value = value.fan;
value.fan = min_speed;
tracing::warn!(
"Fan speed {}% at {}°C is too low. Falling back to {min_speed}%: `{file_name:?}`",
value.fan,
value.temp
);
"Fan speed {}% at {}°C is too low. Falling back to {min_speed}%: `{file_name:?}`",
invalid_fan_value,
value.temp
);
}
}

Expand Down

0 comments on commit f7fb6e4

Please sign in to comment.