mirror of
https://github.com/MarlinFirmware/Marlin.git
synced 2024-11-27 22:08:02 +00:00
Fix starting fan with bad material preset index (#19773)
This commit is contained in:
parent
eaf6777a66
commit
313efa33ae
@ -44,24 +44,17 @@
|
||||
//
|
||||
|
||||
void Temperature::lcd_preheat(const int16_t e, const int8_t indh, const int8_t indb) {
|
||||
UNUSED(e); UNUSED(indh); UNUSED(indb);
|
||||
#if HAS_HOTEND
|
||||
if (indh >= 0 && ui.material_preset[indh].hotend_temp > 0)
|
||||
setTargetHotend(_MIN(thermalManager.heater_maxtemp[e] - HOTEND_OVERSHOOT, ui.material_preset[indh].hotend_temp), e);
|
||||
#else
|
||||
UNUSED(e); UNUSED(indh);
|
||||
#endif
|
||||
#if HAS_HEATED_BED
|
||||
if (indb >= 0 && ui.material_preset[indb].bed_temp > 0) setTargetBed(ui.material_preset[indb].bed_temp);
|
||||
#else
|
||||
UNUSED(indb);
|
||||
#endif
|
||||
#if HAS_FAN
|
||||
set_fan_speed((
|
||||
#if FAN_COUNT > 1
|
||||
active_extruder < FAN_COUNT ? active_extruder :
|
||||
#endif
|
||||
0), ui.material_preset[indh].fan_speed
|
||||
);
|
||||
if (indh >= 0)
|
||||
set_fan_speed(active_extruder < (FAN_COUNT) ? active_extruder : 0, ui.material_preset[indh].fan_speed);
|
||||
#endif
|
||||
ui.return_to_status();
|
||||
}
|
||||
@ -93,7 +86,9 @@ void Temperature::lcd_preheat(const int16_t e, const int8_t indh, const int8_t i
|
||||
|
||||
#endif
|
||||
|
||||
void do_preheat_end_m() { _preheat_end(editable.int8, 0); }
|
||||
void do_preheat_end_m() {
|
||||
_preheat_end(editable.int8, 0);
|
||||
}
|
||||
|
||||
#if HAS_MULTI_HOTEND || HAS_HEATED_BED
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user