Browse Source

Toss obsolete DEBUG_LEVELING_FEATURE tests

Scott Lahteine 6 years ago
parent
commit
42b5ccafc9
2 changed files with 31 additions and 52 deletions
  1. 2
    4
      Marlin/src/module/motion.cpp
  2. 29
    48
      Marlin/src/module/tool_change.cpp

+ 2
- 4
Marlin/src/module/motion.cpp View File

538
 
538
 
539
     #endif
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 View File

605
      * 9. Apply Z hotend offset to current position
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
     // 1. Raise Z-Axis to give enough clearance
610
     // 1. Raise Z-Axis to give enough clearance
613
 
611
 
614
     current_position[Z_AXIS] += SWITCHING_TOOLHEAD_Z_HOP;
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
     planner.buffer_line(current_position, planner.settings.max_feedrate_mm_s[Z_AXIS], active_extruder);
614
     planner.buffer_line(current_position, planner.settings.max_feedrate_mm_s[Z_AXIS], active_extruder);
619
 
615
 
620
     // 2. Move to position near active extruder parking
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
     current_position[X_AXIS] = placexpos + hotend_offset[X_AXIS][active_extruder];
623
     current_position[X_AXIS] = placexpos + hotend_offset[X_AXIS][active_extruder];
630
     current_position[Y_AXIS] = SWITCHING_TOOLHEAD_Y_POS + SWITCHING_TOOLHEAD_Y_CLEAR + hotend_offset[Y_AXIS][active_extruder];
624
     current_position[Y_AXIS] = SWITCHING_TOOLHEAD_Y_POS + SWITCHING_TOOLHEAD_Y_CLEAR + hotend_offset[Y_AXIS][active_extruder];
631
     planner.buffer_line(current_position, planner.settings.max_feedrate_mm_s[X_AXIS], active_extruder);
625
     planner.buffer_line(current_position, planner.settings.max_feedrate_mm_s[X_AXIS], active_extruder);
632
 
626
 
633
     // 3. Move gently to park position of active extruder
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
     current_position[Y_AXIS] -= SWITCHING_TOOLHEAD_Y_CLEAR;
635
     current_position[Y_AXIS] -= SWITCHING_TOOLHEAD_Y_CLEAR;
644
     planner.buffer_line(current_position, planner.settings.max_feedrate_mm_s[Y_AXIS] * 0.5, active_extruder);
636
     planner.buffer_line(current_position, planner.settings.max_feedrate_mm_s[Y_AXIS] * 0.5, active_extruder);
645
 
637
 
646
     // 4. Disengage magnetic field, wait for delay
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
     planner.synchronize();
642
     planner.synchronize();
653
     est_deactivate_solenoid();
643
     est_deactivate_solenoid();
654
 
644
 
655
     // 5. Leave extruder and move to position near new extruder parking
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
     current_position[Y_AXIS] += SWITCHING_TOOLHEAD_Y_CLEAR;
652
     current_position[Y_AXIS] += SWITCHING_TOOLHEAD_Y_CLEAR;
665
     planner.buffer_line(current_position, planner.settings.max_feedrate_mm_s[Y_AXIS] * 0.5f, active_extruder);
653
     planner.buffer_line(current_position, planner.settings.max_feedrate_mm_s[Y_AXIS] * 0.5f, active_extruder);
670
 
658
 
671
     // 6. Move gently to park position of new extruder
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
     current_position[Y_AXIS] -= SWITCHING_TOOLHEAD_Y_CLEAR;
666
     current_position[Y_AXIS] -= SWITCHING_TOOLHEAD_Y_CLEAR;
681
     planner.buffer_line(current_position, planner.settings.max_feedrate_mm_s[Y_AXIS] * 0.5f, active_extruder);
667
     planner.buffer_line(current_position, planner.settings.max_feedrate_mm_s[Y_AXIS] * 0.5f, active_extruder);
682
 
668
 
683
     // 7. Engage magnetic field for new extruder parking
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
     planner.synchronize();
671
     planner.synchronize();
672
+
673
+    if (DEBUGGING(LEVELING)) SERIAL_ECHOLNPGM("(7) Engage magnetic field");
674
+
690
     est_activate_solenoid();
675
     est_activate_solenoid();
691
 
676
 
692
     // 8. Unpark extruder
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
     current_position[Y_AXIS] += SWITCHING_TOOLHEAD_Y_CLEAR;
681
     current_position[Y_AXIS] += SWITCHING_TOOLHEAD_Y_CLEAR;
699
 
682
 
703
 
686
 
704
     current_position[Z_AXIS] += hotend_offset[Z_AXIS][active_extruder] - hotend_offset[Z_AXIS][tmp_extruder];
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
 #endif // ELECTROMAGNETIC_SWITCHING_TOOLHEAD
695
 #endif // ELECTROMAGNETIC_SWITCHING_TOOLHEAD

Loading…
Cancel
Save