Skip to content

Commit

Permalink
bump version and use const
Browse files Browse the repository at this point in the history
  • Loading branch information
benjamin-wilson committed Oct 18, 2023
1 parent 7895289 commit 6d93054
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "2.0.0",
"version": "2.0.1",
"tasks": [
{
"label": "Build - Build project",
Expand Down
5 changes: 3 additions & 2 deletions main/tasks/power_management_task.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

#define POLL_RATE 5000
#define MAX_TEMP 90.0
#define THROTTLE_TEMP 80.0
#define THROTTLE_TEMP 75.0
#define THROTTLE_TEMP_RANGE (MAX_TEMP - THROTTLE_TEMP)

#define VOLTAGE_START_THROTTLE 4900
Expand Down Expand Up @@ -119,7 +119,8 @@ void POWER_MANAGEMENT_task(void * pvParameters)
} else if (strcmp(GLOBAL_STATE->asic_model, "BM1366") == 0) {
power_management->chip_temp = EMC2101_get_internal_temp() + 5;

if (power_management->chip_temp > 75 && (power_management->frequency_value > 50 || power_management->voltage > 1000)) {
if (power_management->chip_temp > THROTTLE_TEMP &&
(power_management->frequency_value > 50 || power_management->voltage > 1000)) {
ESP_LOGE(TAG, "OVERHEAT");
nvs_config_set_u16(NVS_CONFIG_ASIC_VOLTAGE, 990);
nvs_config_set_u16(NVS_CONFIG_ASIC_FREQ, 50);
Expand Down

0 comments on commit 6d93054

Please sign in to comment.