Explorar el Código

No more direct G28 calls

Scott Lahteine hace 4 años
padre
commit
5171e9da93
Se han modificado 3 ficheros con 4 adiciones y 5 borrados
  1. 2
    3
      Marlin/src/gcode/calibrate/G28.cpp
  2. 1
    1
      Marlin/src/gcode/gcode.cpp
  3. 1
    1
      Marlin/src/gcode/gcode.h

+ 2
- 3
Marlin/src/gcode/calibrate/G28.cpp Ver fichero

@@ -210,7 +210,7 @@
210 210
  *  Z   Home to the Z endstop
211 211
  *
212 212
  */
213
-void GcodeSuite::G28(const bool always_home_all) {
213
+void GcodeSuite::G28() {
214 214
   if (DEBUGGING(LEVELING)) {
215 215
     DEBUG_ECHOLNPGM(">>> G28");
216 216
     log_machine_info();
@@ -311,7 +311,6 @@ void GcodeSuite::G28(const bool always_home_all) {
311 311
   #if ENABLED(DELTA)
312 312
 
313 313
     home_delta();
314
-    UNUSED(always_home_all);
315 314
 
316 315
     #if ENABLED(IMPROVE_HOMING_RELIABILITY)
317 316
       end_slow_homing(slow_homing);
@@ -320,7 +319,7 @@ void GcodeSuite::G28(const bool always_home_all) {
320 319
   #else // NOT DELTA
321 320
 
322 321
     const bool homeX = parser.seen('X'), homeY = parser.seen('Y'), homeZ = parser.seen('Z'),
323
-               home_all = always_home_all || (homeX == homeY && homeX == homeZ),
322
+               home_all = homeX == homeY && homeX == homeZ, // All or None
324 323
                doX = home_all || homeX, doY = home_all || homeY, doZ = home_all || homeZ;
325 324
 
326 325
     destination = current_position;

+ 1
- 1
Marlin/src/gcode/gcode.cpp Ver fichero

@@ -277,7 +277,7 @@ void GcodeSuite::process_parsed_command(const bool no_ok/*=false*/) {
277 277
         case 27: G27(); break;                                    // G27: Nozzle Park
278 278
       #endif
279 279
 
280
-      case 28: G28(false); break;                                 // G28: Home all axes, one at a time
280
+      case 28: G28(); break;                                      // G28: Home one or more axes
281 281
 
282 282
       #if HAS_LEVELING
283 283
         case 29:                                                  // G29: Bed leveling calibration

+ 1
- 1
Marlin/src/gcode/gcode.h Ver fichero

@@ -434,7 +434,7 @@ private:
434 434
     static void G27();
435 435
   #endif
436 436
 
437
-  static void G28(const bool always_home_all);
437
+  static void G28();
438 438
 
439 439
   #if HAS_LEVELING
440 440
     #if ENABLED(G29_RETRY_AND_RECOVER)

Loading…
Cancelar
Guardar