Skip to content

Commit

Permalink
return 0 past range
Browse files Browse the repository at this point in the history
  • Loading branch information
thinkyhead committed May 20, 2024
1 parent 17ac2db commit a6945fd
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Marlin/src/module/temperature.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1303,8 +1303,10 @@ int16_t Temperature::getHeaterPower(const heater_id_t heater_id) {
#if HAS_COOLER
case H_COOLER: return temp_cooler.soft_pwm_amount;
#endif
default:
return TERN0(HAS_HOTEND, temp_hotend[_MIN(heater_id, HOTENDS - 1)].soft_pwm_amount);
#if HAS_HOTEND
case 0 ... HOTENDS - 1: return temp_hotend[heater_id].soft_pwm_amount;
#endif
default: return 0;
}
}

Expand Down

0 comments on commit a6945fd

Please sign in to comment.