From 052b8bfda6b93e2c840cbc6245c82d1bcb60af2b Mon Sep 17 00:00:00 2001 From: mutatrum Date: Sat, 14 Dec 2024 00:51:07 +0100 Subject: [PATCH] Toggle auto_fan_speed without reboot (#580) If you can change the fan speed immediately, so should the enabling or disabling of auto fan speed. --- main/tasks/power_management_task.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/main/tasks/power_management_task.c b/main/tasks/power_management_task.c index 7ac98746..0bd0a8d5 100644 --- a/main/tasks/power_management_task.c +++ b/main/tasks/power_management_task.c @@ -88,8 +88,6 @@ void POWER_MANAGEMENT_task(void * pvParameters) //int last_frequency_increase = 0; //uint16_t frequency_target = nvs_config_get_u16(NVS_CONFIG_ASIC_FREQ, CONFIG_ASIC_FREQUENCY); - uint16_t auto_fan_speed = nvs_config_get_u16(NVS_CONFIG_AUTO_FAN_SPEED, 1); - switch (GLOBAL_STATE->device_model) { case DEVICE_MAX: case DEVICE_ULTRA: @@ -245,7 +243,7 @@ void POWER_MANAGEMENT_task(void * pvParameters) } - if (auto_fan_speed == 1) { + if (nvs_config_get_u16(NVS_CONFIG_AUTO_FAN_SPEED, 1) == 1) { power_management->fan_perc = (float)automatic_fan_speed(power_management->chip_temp_avg, GLOBAL_STATE);