Merge pull request #4173 from gudnimg/disable-heaters-gudni
optimisation: use `disable_heater()` in more places
This commit is contained in:
commit
9fd478c9c2
|
|
@ -3112,8 +3112,7 @@ bool gcode_M45(bool onlyZ, int8_t verbosity_level)
|
|||
// Only Z calibration?
|
||||
if (!onlyZ)
|
||||
{
|
||||
setTargetBed(0);
|
||||
setTargetHotend(0);
|
||||
disable_heater();
|
||||
eeprom_adjust_bed_reset(); //reset bed level correction
|
||||
}
|
||||
|
||||
|
|
@ -9390,8 +9389,7 @@ static void handleSafetyTimer()
|
|||
}
|
||||
else if (safetyTimer.expired(farm_mode?FARM_DEFAULT_SAFETYTIMER_TIME_ms:safetytimer_inactive_time))
|
||||
{
|
||||
setTargetBed(0);
|
||||
setTargetHotend(0);
|
||||
disable_heater();
|
||||
lcd_show_fullscreen_message_and_wait_P(_i("Heating disabled by safety timer."));////MSG_BED_HEATING_SAFETY_DISABLED c=20 r=4
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -163,9 +163,7 @@ static void trace() {
|
|||
}
|
||||
|
||||
void serial_read_stream() {
|
||||
|
||||
setTargetHotend(0);
|
||||
setTargetBed(0);
|
||||
disable_heater();
|
||||
|
||||
lcd_clear();
|
||||
lcd_puts_P(PSTR(" Upload in progress"));
|
||||
|
|
|
|||
|
|
@ -78,8 +78,7 @@ void uvlo_() {
|
|||
}
|
||||
|
||||
// Stop all heaters before continuing
|
||||
setTargetHotend(0);
|
||||
setTargetBed(0);
|
||||
disable_heater();
|
||||
|
||||
// Fetch data not included in a partial back-up
|
||||
if (!sd_print_saved_in_ram) {
|
||||
|
|
@ -234,8 +233,7 @@ static void uvlo_tiny() {
|
|||
#endif //TMC2130
|
||||
|
||||
// Stop all heaters
|
||||
setTargetHotend(0);
|
||||
setTargetBed(0);
|
||||
disable_heater();
|
||||
|
||||
// When power is interrupted on the _first_ recovery an attempt can be made to raise the
|
||||
// extruder, causing the Z position to change. Similarly, when recovering, the Z position is
|
||||
|
|
|
|||
|
|
@ -1038,8 +1038,7 @@ static void lcd_move_menu_axis();
|
|||
|
||||
static void lcd_cooldown()
|
||||
{
|
||||
setTargetHotend(0);
|
||||
setTargetBed(0);
|
||||
disable_heater();
|
||||
fanSpeed = 0;
|
||||
lcd_return_to_status();
|
||||
}
|
||||
|
|
@ -2722,8 +2721,7 @@ void pid_extruder()
|
|||
|
||||
#ifdef PINDA_THERMISTOR
|
||||
bool lcd_wait_for_pinda(float temp) {
|
||||
setTargetHotend(0);
|
||||
setTargetBed(0);
|
||||
disable_heater();
|
||||
LongTimer pinda_timeout;
|
||||
pinda_timeout.start();
|
||||
bool target_temp_reached = true;
|
||||
|
|
@ -2754,8 +2752,7 @@ void lcd_wait_for_heater() {
|
|||
}
|
||||
|
||||
void lcd_wait_for_cool_down() {
|
||||
setTargetHotend(0);
|
||||
setTargetBed(0);
|
||||
disable_heater();
|
||||
uint8_t fanSpeedBckp = fanSpeed;
|
||||
fanSpeed = 255;
|
||||
while ((degHotend(0)>MAX_HOTEND_TEMP_CALIBRATION) || (degBed() > MAX_BED_TEMP_CALIBRATION)) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue