Browse Source

Move shared code to wait_for_bed_heating

vanilla_fb_2.0.x
Scott Lahteine 5 years ago
parent
commit
7709261ea9
  1. 12
      Marlin/src/module/motion.cpp
  2. 12
      Marlin/src/module/probe.cpp
  3. 3
      Marlin/src/module/probe.h
  4. 9
      Marlin/src/module/temperature.cpp
  5. 2
      Marlin/src/module/temperature.h

12
Marlin/src/module/motion.cpp

@ -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) #if HOMING_Z_WITH_PROBE && HAS_HEATED_BED && ENABLED(WAIT_FOR_BED_HEATER)
// Wait for bed to heat back up between probing points // Wait for bed to heat back up between probing points
if (axis == Z_AXIS && distance < 0 && thermalManager.isHeatingBed()) { if (axis == Z_AXIS && distance < 0)
serialprintPGM(probe.msg_wait_for_bed_heating); thermalManager.wait_for_bed_heating();
#if HAS_DISPLAY
LCD_MESSAGEPGM(MSG_BED_HEATING);
#endif
thermalManager.wait_for_bed();
#if HAS_DISPLAY
ui.reset_status();
#endif
}
#endif #endif
// Only do some things when moving towards an endstop // Only do some things when moving towards an endstop

12
Marlin/src/module/probe.cpp

@ -455,10 +455,6 @@ bool Probe::set_deployed(const bool deploy) {
* @return true to indicate an error * @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 * @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 (DEBUGGING(LEVELING)) DEBUG_POS(">>> Probe::probe_down_to_z", current_position);
#if HAS_HEATED_BED && ENABLED(WAIT_FOR_BED_HEATER) #if HAS_HEATED_BED && ENABLED(WAIT_FOR_BED_HEATER)
// Wait for bed to heat back up between probing points thermalManager.wait_for_bed_heating();
if (thermalManager.isHeatingBed()) {
serialprintPGM(msg_wait_for_bed_heating);
LCD_MESSAGEPGM(MSG_BED_HEATING);
thermalManager.wait_for_bed();
ui.reset_status();
}
#endif #endif
#if ENABLED(BLTOUCH) && DISABLED(BLTOUCH_HS_MODE) #if ENABLED(BLTOUCH) && DISABLED(BLTOUCH_HS_MODE)

3
Marlin/src/module/probe.h

@ -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) { 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); 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 #else

9
Marlin/src/module/temperature.cpp

@ -3361,6 +3361,15 @@ void Temperature::tick() {
return wait_for_heatup; 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 #endif // HAS_HEATED_BED
#if HAS_HEATED_CHAMBER #if HAS_HEATED_CHAMBER

2
Marlin/src/module/temperature.h

@ -701,6 +701,8 @@ class Temperature {
#endif #endif
); );
static void wait_for_bed_heating();
#endif // HAS_HEATED_BED #endif // HAS_HEATED_BED
#if HAS_TEMP_PROBE #if HAS_TEMP_PROBE

Loading…
Cancel
Save