Selaa lähdekoodia

Toss obsolete DEBUG_LEVELING_FEATURE tests

Scott Lahteine 5 vuotta sitten
vanhempi
commit
42b5ccafc9
2 muutettua tiedostoa jossa 31 lisäystä ja 52 poistoa
  1. 2
    4
      Marlin/src/module/motion.cpp
  2. 29
    48
      Marlin/src/module/tool_change.cpp

+ 2
- 4
Marlin/src/module/motion.cpp Näytä tiedosto

@@ -538,10 +538,8 @@ void clean_up_after_endstop_or_probe_move() {
538 538
 
539 539
     #endif
540 540
 
541
-  #if ENABLED(DEBUG_LEVELING_FEATURE)
542
-    if (DEBUGGING(LEVELING))
543
-      SERIAL_ECHOLNPAIR("Axis ", axis_codes[axis], " min:", soft_endstop[axis].min, " max:", soft_endstop[axis].max);
544
-  #endif
541
+  if (DEBUGGING(LEVELING))
542
+    SERIAL_ECHOLNPAIR("Axis ", axis_codes[axis], " min:", soft_endstop[axis].min, " max:", soft_endstop[axis].max);
545 543
 }
546 544
 
547 545
   /**

+ 29
- 48
Marlin/src/module/tool_change.cpp Näytä tiedosto

@@ -605,61 +605,49 @@ inline void fast_line_to_current(const AxisEnum fr_axis) {
605 605
      * 9. Apply Z hotend offset to current position
606 606
      */
607 607
 
608
-    #if ENABLED(DEBUG_LEVELING_FEATURE)
609
-      if (DEBUGGING(LEVELING)) DEBUG_POS("Starting Autopark", current_position);
610
-    #endif
608
+    if (DEBUGGING(LEVELING)) DEBUG_POS("Starting Autopark", current_position);
611 609
 
612 610
     // 1. Raise Z-Axis to give enough clearance
613 611
 
614 612
     current_position[Z_AXIS] += SWITCHING_TOOLHEAD_Z_HOP;
615
-    #if ENABLED(DEBUG_LEVELING_FEATURE)
616
-      if (DEBUGGING(LEVELING)) DEBUG_POS("(1) Raise Z-Axis ", current_position);
617
-    #endif
613
+    if (DEBUGGING(LEVELING)) DEBUG_POS("(1) Raise Z-Axis ", current_position);
618 614
     planner.buffer_line(current_position, planner.settings.max_feedrate_mm_s[Z_AXIS], active_extruder);
619 615
 
620 616
     // 2. Move to position near active extruder parking
621 617
 
622
-    #if ENABLED(DEBUG_LEVELING_FEATURE)
623
-      if (DEBUGGING(LEVELING)) {
624
-        planner.synchronize();
625
-        SERIAL_ECHOLNPAIR("(2) Move near active extruder parking", active_extruder);
626
-        DEBUG_POS("Moving ParkPos", current_position);
627
-      }
628
-    #endif
618
+    if (DEBUGGING(LEVELING)) {
619
+      planner.synchronize();
620
+      SERIAL_ECHOLNPAIR("(2) Move near active extruder parking", active_extruder);
621
+      DEBUG_POS("Moving ParkPos", current_position);
622
+    }
629 623
     current_position[X_AXIS] = placexpos + hotend_offset[X_AXIS][active_extruder];
630 624
     current_position[Y_AXIS] = SWITCHING_TOOLHEAD_Y_POS + SWITCHING_TOOLHEAD_Y_CLEAR + hotend_offset[Y_AXIS][active_extruder];
631 625
     planner.buffer_line(current_position, planner.settings.max_feedrate_mm_s[X_AXIS], active_extruder);
632 626
 
633 627
     // 3. Move gently to park position of active extruder
634 628
 
635
-    #if ENABLED(DEBUG_LEVELING_FEATURE)
636
-      if (DEBUGGING(LEVELING)) {
637
-        planner.synchronize();
638
-        SERIAL_ECHOLNPAIR("(3) Move gently to park position of active extruder", active_extruder);
639
-        DEBUG_POS("Moving ParkPos", current_position);
640
-      }
641
-    #endif
629
+    if (DEBUGGING(LEVELING)) {
630
+      planner.synchronize();
631
+      SERIAL_ECHOLNPAIR("(3) Move gently to park position of active extruder", active_extruder);
632
+      DEBUG_POS("Moving ParkPos", current_position);
633
+    }
642 634
 
643 635
     current_position[Y_AXIS] -= SWITCHING_TOOLHEAD_Y_CLEAR;
644 636
     planner.buffer_line(current_position, planner.settings.max_feedrate_mm_s[Y_AXIS] * 0.5, active_extruder);
645 637
 
646 638
     // 4. Disengage magnetic field, wait for delay
647 639
 
648
-    #if ENABLED(DEBUG_LEVELING_FEATURE)
649
-      if (DEBUGGING(LEVELING)) SERIAL_ECHOLNPGM("(4) Disengage magnet");
650
-    #endif
640
+    if (DEBUGGING(LEVELING)) SERIAL_ECHOLNPGM("(4) Disengage magnet");
651 641
 
652 642
     planner.synchronize();
653 643
     est_deactivate_solenoid();
654 644
 
655 645
     // 5. Leave extruder and move to position near new extruder parking
656 646
 
657
-    #if ENABLED(DEBUG_LEVELING_FEATURE)
658
-      if (DEBUGGING(LEVELING)) {
659
-        SERIAL_ECHOLNPGM("(5) Move near new extruder parking");
660
-        DEBUG_POS("Moving ParkPos", current_position);
661
-      }
662
-    #endif
647
+    if (DEBUGGING(LEVELING)) {
648
+      SERIAL_ECHOLNPGM("(5) Move near new extruder parking");
649
+      DEBUG_POS("Moving ParkPos", current_position);
650
+    }
663 651
 
664 652
     current_position[Y_AXIS] += SWITCHING_TOOLHEAD_Y_CLEAR;
665 653
     planner.buffer_line(current_position, planner.settings.max_feedrate_mm_s[Y_AXIS] * 0.5f, active_extruder);
@@ -670,30 +658,25 @@ inline void fast_line_to_current(const AxisEnum fr_axis) {
670 658
 
671 659
     // 6. Move gently to park position of new extruder
672 660
 
673
-    #if ENABLED(DEBUG_LEVELING_FEATURE)
674
-      if (DEBUGGING(LEVELING)) {
675
-        planner.synchronize();
676
-        SERIAL_ECHOLNPGM("(6) Move near new extruder");
677
-      }
678
-    #endif
661
+    if (DEBUGGING(LEVELING)) {
662
+      planner.synchronize();
663
+      SERIAL_ECHOLNPGM("(6) Move near new extruder");
664
+    }
679 665
 
680 666
     current_position[Y_AXIS] -= SWITCHING_TOOLHEAD_Y_CLEAR;
681 667
     planner.buffer_line(current_position, planner.settings.max_feedrate_mm_s[Y_AXIS] * 0.5f, active_extruder);
682 668
 
683 669
     // 7. Engage magnetic field for new extruder parking
684 670
 
685
-    #if ENABLED(DEBUG_LEVELING_FEATURE)
686
-      if (DEBUGGING(LEVELING)) SERIAL_ECHOLNPGM("(7) Engage magnetic field");
687
-    #endif
688
-
689 671
     planner.synchronize();
672
+
673
+    if (DEBUGGING(LEVELING)) SERIAL_ECHOLNPGM("(7) Engage magnetic field");
674
+
690 675
     est_activate_solenoid();
691 676
 
692 677
     // 8. Unpark extruder
693 678
 
694
-    #if ENABLED(DEBUG_LEVELING_FEATURE)
695
-      if (DEBUGGING(LEVELING)) SERIAL_ECHOLNPGM("(8) Unpark extruder");
696
-    #endif
679
+    if (DEBUGGING(LEVELING)) SERIAL_ECHOLNPGM("(8) Unpark extruder");
697 680
 
698 681
     current_position[Y_AXIS] += SWITCHING_TOOLHEAD_Y_CLEAR;
699 682
 
@@ -703,12 +686,10 @@ inline void fast_line_to_current(const AxisEnum fr_axis) {
703 686
 
704 687
     current_position[Z_AXIS] += hotend_offset[Z_AXIS][active_extruder] - hotend_offset[Z_AXIS][tmp_extruder];
705 688
 
706
-    #if ENABLED(DEBUG_LEVELING_FEATURE)
707
-      if (DEBUGGING(LEVELING)) {
708
-        planner.synchronize();
709
-        DEBUG_POS("(9) Applying Z-offset", current_position);
710
-      }
711
-    #endif
689
+    if (DEBUGGING(LEVELING)) {
690
+      planner.synchronize();
691
+      DEBUG_POS("(9) Applying Z-offset", current_position);
692
+    }
712 693
   }
713 694
 
714 695
 #endif // ELECTROMAGNETIC_SWITCHING_TOOLHEAD

Loading…
Peruuta
Tallenna