Move shared code to wait_for_bed_heating
This commit is contained in:
parent
ab1863ac48
commit
7709261ea9
5 changed files with 14 additions and 24 deletions
|
@ -1312,16 +1312,8 @@ void do_homing_move(const AxisEnum axis, const float distance, const feedRate_t
|
|||
|
||||
#if HOMING_Z_WITH_PROBE && HAS_HEATED_BED && ENABLED(WAIT_FOR_BED_HEATER)
|
||||
// Wait for bed to heat back up between probing points
|
||||
if (axis == Z_AXIS && distance < 0 && thermalManager.isHeatingBed()) {
|
||||
serialprintPGM(probe.msg_wait_for_bed_heating);
|
||||
#if HAS_DISPLAY
|
||||
LCD_MESSAGEPGM(MSG_BED_HEATING);
|
||||
#endif
|
||||
thermalManager.wait_for_bed();
|
||||
#if HAS_DISPLAY
|
||||
ui.reset_status();
|
||||
#endif
|
||||
}
|
||||
if (axis == Z_AXIS && distance < 0)
|
||||
thermalManager.wait_for_bed_heating();
|
||||
#endif
|
||||
|
||||
// Only do some things when moving towards an endstop
|
||||
|
|
|
@ -455,10 +455,6 @@ bool Probe::set_deployed(const bool deploy) {
|
|||
* @return true to indicate an error
|
||||
*/
|
||||
|
||||
#if HAS_BED_PROBE && HAS_HEATED_BED && ENABLED(WAIT_FOR_BED_HEATER)
|
||||
const char Probe::msg_wait_for_bed_heating[25] PROGMEM = "Wait for bed heating...\n";
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Move down until the probe triggers or the low limit is reached
|
||||
*
|
||||
|
@ -473,13 +469,7 @@ bool Probe::probe_down_to_z(const float z, const feedRate_t fr_mm_s) {
|
|||
if (DEBUGGING(LEVELING)) DEBUG_POS(">>> Probe::probe_down_to_z", current_position);
|
||||
|
||||
#if HAS_HEATED_BED && ENABLED(WAIT_FOR_BED_HEATER)
|
||||
// Wait for bed to heat back up between probing points
|
||||
if (thermalManager.isHeatingBed()) {
|
||||
serialprintPGM(msg_wait_for_bed_heating);
|
||||
LCD_MESSAGEPGM(MSG_BED_HEATING);
|
||||
thermalManager.wait_for_bed();
|
||||
ui.reset_status();
|
||||
}
|
||||
thermalManager.wait_for_bed_heating();
|
||||
#endif
|
||||
|
||||
#if ENABLED(BLTOUCH) && DISABLED(BLTOUCH_HS_MODE)
|
||||
|
|
|
@ -87,9 +87,6 @@ public:
|
|||
static inline float probe_at_point(const xy_pos_t &pos, const ProbePtRaise raise_after=PROBE_PT_NONE, const uint8_t verbose_level=0, const bool probe_relative=true, const bool sanity_check=true) {
|
||||
return probe_at_point(pos.x, pos.y, raise_after, verbose_level, probe_relative, sanity_check);
|
||||
}
|
||||
#if HAS_HEATED_BED && ENABLED(WAIT_FOR_BED_HEATER)
|
||||
static const char msg_wait_for_bed_heating[25];
|
||||
#endif
|
||||
|
||||
#else
|
||||
|
||||
|
|
|
@ -3361,6 +3361,15 @@ void Temperature::tick() {
|
|||
return wait_for_heatup;
|
||||
}
|
||||
|
||||
void Temperature::wait_for_bed_heating() {
|
||||
if (isHeatingBed()) {
|
||||
SERIAL_ECHOLNPGM("Wait for bed heating...");
|
||||
LCD_MESSAGEPGM(MSG_BED_HEATING);
|
||||
wait_for_bed();
|
||||
ui.reset_status();
|
||||
}
|
||||
}
|
||||
|
||||
#endif // HAS_HEATED_BED
|
||||
|
||||
#if HAS_HEATED_CHAMBER
|
||||
|
|
|
@ -701,6 +701,8 @@ class Temperature {
|
|||
#endif
|
||||
);
|
||||
|
||||
static void wait_for_bed_heating();
|
||||
|
||||
#endif // HAS_HEATED_BED
|
||||
|
||||
#if HAS_TEMP_PROBE
|
||||
|
|
Reference in a new issue