Browse Source

Add a macro for XY_TRAVEL_FEEDRATE

Scott Lahteine 9 years ago
parent
commit
88dc543584
1 changed files with 7 additions and 15 deletions
  1. 7
    15
      Marlin/Marlin_main.cpp

+ 7
- 15
Marlin/Marlin_main.cpp View File

369
 #if ENABLED(AUTO_BED_LEVELING_FEATURE)
369
 #if ENABLED(AUTO_BED_LEVELING_FEATURE)
370
   int xy_travel_speed = XY_TRAVEL_SPEED;
370
   int xy_travel_speed = XY_TRAVEL_SPEED;
371
   bool bed_leveling_in_progress = false;
371
   bool bed_leveling_in_progress = false;
372
+  #define XY_TRAVEL_FEEDRATE xy_travel_speed
373
+#else
374
+  #define XY_TRAVEL_FEEDRATE (min(planner.max_feedrate[X_AXIS], planner.max_feedrate[Y_AXIS]) * 60)
372
 #endif
375
 #endif
373
 
376
 
374
 #if ENABLED(Z_DUAL_ENDSTOPS) && DISABLED(DELTA)
377
 #if ENABLED(Z_DUAL_ENDSTOPS) && DISABLED(DELTA)
1633
 
1636
 
1634
     #if ENABLED(DELTA)
1637
     #if ENABLED(DELTA)
1635
 
1638
 
1636
-      feedrate =
1637
-        #if ENABLED(AUTO_BED_LEVELING_FEATURE)
1638
-          xy_travel_speed
1639
-        #else
1640
-          min(planner.max_feedrate[X_AXIS], planner.max_feedrate[Y_AXIS]) * 60
1641
-        #endif
1642
-      ;
1639
+      feedrate = XY_TRAVEL_FEEDRATE;
1643
 
1640
 
1644
       destination[X_AXIS] = x;
1641
       destination[X_AXIS] = x;
1645
       destination[Y_AXIS] = y;
1642
       destination[Y_AXIS] = y;
1658
       line_to_current_position();
1655
       line_to_current_position();
1659
       stepper.synchronize();
1656
       stepper.synchronize();
1660
 
1657
 
1661
-      feedrate =
1662
-        #if ENABLED(AUTO_BED_LEVELING_FEATURE)
1663
-          xy_travel_speed
1664
-        #else
1665
-          min(planner.max_feedrate[X_AXIS], planner.max_feedrate[Y_AXIS]) * 60
1666
-        #endif
1667
-      ;
1658
+      feedrate = XY_TRAVEL_FEEDRATE;
1668
 
1659
 
1669
       current_position[X_AXIS] = x;
1660
       current_position[X_AXIS] = x;
1670
       current_position[Y_AXIS] = y;
1661
       current_position[Y_AXIS] = y;
2981
             destination[X_AXIS] = round(Z_SAFE_HOMING_X_POINT - (X_PROBE_OFFSET_FROM_EXTRUDER));
2972
             destination[X_AXIS] = round(Z_SAFE_HOMING_X_POINT - (X_PROBE_OFFSET_FROM_EXTRUDER));
2982
             destination[Y_AXIS] = round(Z_SAFE_HOMING_Y_POINT - (Y_PROBE_OFFSET_FROM_EXTRUDER));
2973
             destination[Y_AXIS] = round(Z_SAFE_HOMING_Y_POINT - (Y_PROBE_OFFSET_FROM_EXTRUDER));
2983
             destination[Z_AXIS] = current_position[Z_AXIS]; //z is already at the right height
2974
             destination[Z_AXIS] = current_position[Z_AXIS]; //z is already at the right height
2984
-            feedrate = XY_TRAVEL_SPEED;
2975
+
2976
+            feedrate = XY_TRAVEL_FEEDRATE;
2985
 
2977
 
2986
             #if ENABLED(DEBUG_LEVELING_FEATURE)
2978
             #if ENABLED(DEBUG_LEVELING_FEATURE)
2987
               if (DEBUGGING(LEVELING)) {
2979
               if (DEBUGGING(LEVELING)) {

Loading…
Cancel
Save