From bfb683ebc5a419836f5a52b45d8a6b755426674d Mon Sep 17 00:00:00 2001 From: Tigerblue77 <37409593+tigerblue77@users.noreply.github.com> Date: Sat, 16 Mar 2024 14:25:54 +0100 Subject: [PATCH] Improved code structure --- Dell_iDRAC_fan_controller.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dell_iDRAC_fan_controller.sh b/Dell_iDRAC_fan_controller.sh index 148fdff..00b73dc 100755 --- a/Dell_iDRAC_fan_controller.sh +++ b/Dell_iDRAC_fan_controller.sh @@ -156,8 +156,6 @@ while true; do fi elif $FAN_SPEED_INTERPOLATION_ENABLED then - DECIMAL_CURRENT_FAN_SPEED=$DECIMAL_FAN_SPEED - HIGHEST_CPU_TEMPERATURE=$CPU1_TEMPERATURE if $IS_CPU2_TEMPERATURE_SENSOR_PRESENT then @@ -190,6 +188,8 @@ while true; do FAN_VALUE_TO_ADD=$((FAN_WINDOW * TEMPERATURE_ABOVE_THRESHOLD_FOR_FAN_SPEED_INTERPOLATION / TEMPERATURE_INTERPOLATION_ACTIVATION_RANGE)) fi DECIMAL_CURRENT_FAN_SPEED=$((DECIMAL_FAN_SPEED + FAN_VALUE_TO_ADD)) + else + DECIMAL_CURRENT_FAN_SPEED=$DECIMAL_FAN_SPEED fi HEXADECIMAL_CURRENT_FAN_SPEED=$(convert_decimal_value_to_hexadecimal $DECIMAL_CURRENT_FAN_SPEED) apply_fan_speed_interpolation_fan_control_profile