Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add fall back to automatic fan speed #563

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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