AnHardt 9 years ago
parent
commit
96a162beda
1 changed files with 2 additions and 18 deletions
  1. 2
    18
      Marlin/Marlin_main.cpp

+ 2
- 18
Marlin/Marlin_main.cpp View File

2103
     return false;
2103
     return false;
2104
   }
2104
   }
2105
 
2105
 
2106
-  #if ENABLED(DELTA)
2107
-    #define SET_Z_FROM_STEPPERS() set_current_from_steppers()
2108
-  #else
2109
-    #define SET_Z_FROM_STEPPERS() current_position[Z_AXIS] = LOGICAL_POSITION(stepper.get_axis_position_mm(Z_AXIS), Z_AXIS)
2110
-  #endif
2111
-
2112
   // Do a single Z probe and return with current_position[Z_AXIS]
2106
   // Do a single Z probe and return with current_position[Z_AXIS]
2113
   // at the height where the probe triggered.
2107
   // at the height where the probe triggered.
2114
   static float run_z_probe() {
2108
   static float run_z_probe() {
2120
       planner.bed_level_matrix.set_to_identity();
2114
       planner.bed_level_matrix.set_to_identity();
2121
     #endif
2115
     #endif
2122
 
2116
 
2123
-    #if ENABLED(DELTA)
2124
-      float z_before = current_position[Z_AXIS],         // Current Z
2125
-            z_mm = stepper.get_axis_position_mm(Z_AXIS); // Some tower's current position
2126
-    #endif
2127
-
2128
     do_blocking_move_to_z(-(Z_MAX_LENGTH + 10), Z_PROBE_SPEED_FAST);
2117
     do_blocking_move_to_z(-(Z_MAX_LENGTH + 10), Z_PROBE_SPEED_FAST);
2129
     endstops.hit_on_purpose();
2118
     endstops.hit_on_purpose();
2130
-    SET_Z_FROM_STEPPERS();
2119
+    set_current_from_steppers();
2131
     SYNC_PLAN_POSITION_KINEMATIC();
2120
     SYNC_PLAN_POSITION_KINEMATIC();
2132
 
2121
 
2133
     // move up the retract distance
2122
     // move up the retract distance
2134
     do_blocking_move_to_z(current_position[Z_AXIS] + home_bump_mm(Z_AXIS), Z_PROBE_SPEED_FAST);
2123
     do_blocking_move_to_z(current_position[Z_AXIS] + home_bump_mm(Z_AXIS), Z_PROBE_SPEED_FAST);
2135
 
2124
 
2136
-    #if ENABLED(DELTA)
2137
-      z_before = current_position[Z_AXIS];
2138
-      z_mm = stepper.get_axis_position_mm(Z_AXIS);
2139
-    #endif
2140
-
2141
     // move back down slowly to find bed
2125
     // move back down slowly to find bed
2142
     do_blocking_move_to_z(current_position[Z_AXIS] - home_bump_mm(Z_AXIS) * 2, Z_PROBE_SPEED_SLOW);
2126
     do_blocking_move_to_z(current_position[Z_AXIS] - home_bump_mm(Z_AXIS) * 2, Z_PROBE_SPEED_SLOW);
2143
     endstops.hit_on_purpose();
2127
     endstops.hit_on_purpose();
2144
-    SET_Z_FROM_STEPPERS();
2128
+    set_current_from_steppers();
2145
     SYNC_PLAN_POSITION_KINEMATIC();
2129
     SYNC_PLAN_POSITION_KINEMATIC();
2146
 
2130
 
2147
     #if ENABLED(DEBUG_LEVELING_FEATURE)
2131
     #if ENABLED(DEBUG_LEVELING_FEATURE)

Loading…
Cancel
Save