From c4c8281c958a28c1debfc61ae084a8fe0e195605 Mon Sep 17 00:00:00 2001 From: Onur Sahin Date: Wed, 24 Jan 2024 00:45:27 +0100 Subject: [PATCH] fix: fan too low warning message --- tailord/src/fancontrol/profile.rs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/tailord/src/fancontrol/profile.rs b/tailord/src/fancontrol/profile.rs index 827fbf9..b0dbfc3 100644 --- a/tailord/src/fancontrol/profile.rs +++ b/tailord/src/fancontrol/profile.rs @@ -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 + ); } }