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,6 +369,9 @@ static uint8_t target_extruder;
369 369
 #if ENABLED(AUTO_BED_LEVELING_FEATURE)
370 370
   int xy_travel_speed = XY_TRAVEL_SPEED;
371 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 375
 #endif
373 376
 
374 377
 #if ENABLED(Z_DUAL_ENDSTOPS) && DISABLED(DELTA)
@@ -1633,13 +1636,7 @@ static void setup_for_endstop_move() {
1633 1636
 
1634 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 1641
       destination[X_AXIS] = x;
1645 1642
       destination[Y_AXIS] = y;
@@ -1658,13 +1655,7 @@ static void setup_for_endstop_move() {
1658 1655
       line_to_current_position();
1659 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 1660
       current_position[X_AXIS] = x;
1670 1661
       current_position[Y_AXIS] = y;
@@ -2981,7 +2972,8 @@ inline void gcode_G28() {
2981 2972
             destination[X_AXIS] = round(Z_SAFE_HOMING_X_POINT - (X_PROBE_OFFSET_FROM_EXTRUDER));
2982 2973
             destination[Y_AXIS] = round(Z_SAFE_HOMING_Y_POINT - (Y_PROBE_OFFSET_FROM_EXTRUDER));
2983 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 2978
             #if ENABLED(DEBUG_LEVELING_FEATURE)
2987 2979
               if (DEBUGGING(LEVELING)) {

Loading…
Cancel
Save