瀏覽代碼

Move shared code to wait_for_bed_heating

Scott Lahteine 4 年之前
父節點
當前提交
7709261ea9

+ 2
- 10
Marlin/src/module/motion.cpp 查看文件

1312
 
1312
 
1313
   #if HOMING_Z_WITH_PROBE && HAS_HEATED_BED && ENABLED(WAIT_FOR_BED_HEATER)
1313
   #if HOMING_Z_WITH_PROBE && HAS_HEATED_BED && ENABLED(WAIT_FOR_BED_HEATER)
1314
     // Wait for bed to heat back up between probing points
1314
     // Wait for bed to heat back up between probing points
1315
-    if (axis == Z_AXIS && distance < 0 && thermalManager.isHeatingBed()) {
1316
-      serialprintPGM(probe.msg_wait_for_bed_heating);
1317
-      #if HAS_DISPLAY
1318
-        LCD_MESSAGEPGM(MSG_BED_HEATING);
1319
-      #endif
1320
-      thermalManager.wait_for_bed();
1321
-      #if HAS_DISPLAY
1322
-        ui.reset_status();
1323
-      #endif
1324
-    }
1315
+    if (axis == Z_AXIS && distance < 0)
1316
+      thermalManager.wait_for_bed_heating();
1325
   #endif
1317
   #endif
1326
 
1318
 
1327
   // Only do some things when moving towards an endstop
1319
   // Only do some things when moving towards an endstop

+ 1
- 11
Marlin/src/module/probe.cpp 查看文件

455
  * @return true to indicate an error
455
  * @return true to indicate an error
456
  */
456
  */
457
 
457
 
458
-#if HAS_BED_PROBE && HAS_HEATED_BED && ENABLED(WAIT_FOR_BED_HEATER)
459
-  const char Probe::msg_wait_for_bed_heating[25] PROGMEM = "Wait for bed heating...\n";
460
-#endif
461
-
462
 /**
458
 /**
463
  * @brief Move down until the probe triggers or the low limit is reached
459
  * @brief Move down until the probe triggers or the low limit is reached
464
  *
460
  *
473
   if (DEBUGGING(LEVELING)) DEBUG_POS(">>> Probe::probe_down_to_z", current_position);
469
   if (DEBUGGING(LEVELING)) DEBUG_POS(">>> Probe::probe_down_to_z", current_position);
474
 
470
 
475
   #if HAS_HEATED_BED && ENABLED(WAIT_FOR_BED_HEATER)
471
   #if HAS_HEATED_BED && ENABLED(WAIT_FOR_BED_HEATER)
476
-    // Wait for bed to heat back up between probing points
477
-    if (thermalManager.isHeatingBed()) {
478
-      serialprintPGM(msg_wait_for_bed_heating);
479
-      LCD_MESSAGEPGM(MSG_BED_HEATING);
480
-      thermalManager.wait_for_bed();
481
-      ui.reset_status();
482
-    }
472
+    thermalManager.wait_for_bed_heating();
483
   #endif
473
   #endif
484
 
474
 
485
   #if ENABLED(BLTOUCH) && DISABLED(BLTOUCH_HS_MODE)
475
   #if ENABLED(BLTOUCH) && DISABLED(BLTOUCH_HS_MODE)

+ 0
- 3
Marlin/src/module/probe.h 查看文件

87
     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) {
87
     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) {
88
       return probe_at_point(pos.x, pos.y, raise_after, verbose_level, probe_relative, sanity_check);
88
       return probe_at_point(pos.x, pos.y, raise_after, verbose_level, probe_relative, sanity_check);
89
     }
89
     }
90
-    #if HAS_HEATED_BED && ENABLED(WAIT_FOR_BED_HEATER)
91
-      static const char msg_wait_for_bed_heating[25];
92
-    #endif
93
 
90
 
94
   #else
91
   #else
95
 
92
 

+ 9
- 0
Marlin/src/module/temperature.cpp 查看文件

3361
       return wait_for_heatup;
3361
       return wait_for_heatup;
3362
     }
3362
     }
3363
 
3363
 
3364
+    void Temperature::wait_for_bed_heating() {
3365
+      if (isHeatingBed()) {
3366
+        SERIAL_ECHOLNPGM("Wait for bed heating...");
3367
+        LCD_MESSAGEPGM(MSG_BED_HEATING);
3368
+        wait_for_bed();
3369
+        ui.reset_status();
3370
+      }
3371
+    }
3372
+
3364
   #endif // HAS_HEATED_BED
3373
   #endif // HAS_HEATED_BED
3365
 
3374
 
3366
   #if HAS_HEATED_CHAMBER
3375
   #if HAS_HEATED_CHAMBER

+ 2
- 0
Marlin/src/module/temperature.h 查看文件

701
         #endif
701
         #endif
702
       );
702
       );
703
 
703
 
704
+      static void wait_for_bed_heating();
705
+
704
     #endif // HAS_HEATED_BED
706
     #endif // HAS_HEATED_BED
705
 
707
 
706
     #if HAS_TEMP_PROBE
708
     #if HAS_TEMP_PROBE

Loading…
取消
儲存