Skip to content

Commit

Permalink
Fix #1089
Browse files Browse the repository at this point in the history
  • Loading branch information
Ralim committed Oct 2, 2021
1 parent 3594604 commit d6af465
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion source/Core/Src/Settings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ static const SettingConstants settingsConstants[(int)SettingsOptions::SettingsOp
{1, POWER_PULSE_WAIT_MAX, 1, POWER_PULSE_WAIT_DEFAULT}, // KeepAwakePulseWait
{1, POWER_PULSE_DURATION_MAX, 1, POWER_PULSE_DURATION_DEFAULT}, // KeepAwakePulseDuration
{360, 900, 1, VOLTAGE_DIV}, // VoltageDiv
{100, 580, 10, BOOST_TEMP}, // BoostTemp
{0, MAX_TEMP_F, 10, BOOST_TEMP}, // BoostTemp
{100, 2500, 1, CALIBRATION_OFFSET}, // CalibrationOffset
{0, MAX_POWER_LIMIT, POWER_LIMIT_STEPS, POWER_LIMIT}, // PowerLimit
{0, 2, 1, REVERSE_BUTTON_TEMP_CHANGE}, // ReverseButtonTempChangeEnabled
Expand Down
6 changes: 3 additions & 3 deletions source/Core/Src/gui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -513,11 +513,11 @@ static bool settings_setBoostTemp(void) {
value += 20; // Go up 20F at a time
}

if (value > MAX_TEMP_F) {
if (value >= MAX_TEMP_F) {
value = 0; // jump to off
}
setSettingValue(SettingsOptions::BoostTemp, value);
return value == MAX_TEMP_F - 10;
return value >= (MAX_TEMP_F - 10);
}
if (value == 0) {
value = MIN_BOOST_TEMP_C; // loop back at 250
Expand All @@ -528,7 +528,7 @@ static bool settings_setBoostTemp(void) {
value = 0; // Go to off state
}
setSettingValue(SettingsOptions::BoostTemp, value);
return value == MAX_TEMP_C;
return value >= MAX_TEMP_C;
}

static void settings_displayBoostTemp(void) {
Expand Down

0 comments on commit d6af465

Please sign in to comment.