Skip to content

Commit

Permalink
Add fall back to automatic fan speed
Browse files Browse the repository at this point in the history
  • Loading branch information
terratec committed Dec 7, 2024
1 parent 0495f5b commit 8b5a349
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions main/tasks/power_management_task.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
#define POLL_RATE 2000
#define MAX_TEMP 90.0
#define THROTTLE_TEMP 75.0
#define HOT_TEMP 70.0
#define THROTTLE_TEMP_RANGE (MAX_TEMP - THROTTLE_TEMP)

#define VOLTAGE_START_THROTTLE 4900
Expand Down Expand Up @@ -255,6 +256,11 @@ void POWER_MANAGEMENT_task(void * pvParameters)
case DEVICE_GAMMA:

float fs = (float) nvs_config_get_u16(NVS_CONFIG_FAN_SPEED, 100);
if ((HOT_TEMP < power_management->chip_temp_avg) && (90.0 > fs)) {
// (non-persistent) fall back to automatic fan speed if the manual speed is below 90%
auto_fan_speed = 1;
fs = 90.0;
}
power_management->fan_perc = fs;
EMC2101_set_fan_speed((float) fs / 100);

Expand Down

0 comments on commit 8b5a349

Please sign in to comment.