Browse Source

Simplify midpos calculation

Scott Lahteine 7 years ago
parent
commit
fadf9eb2d7
1 changed files with 1 additions and 1 deletions
  1. 1
    1
      Marlin/src/module/tool_change.cpp

+ 1
- 1
Marlin/src/module/tool_change.cpp View File

@@ -274,7 +274,7 @@ void tool_change(const uint8_t tmp_extruder, const float fr_mm_s/*=0.0*/, bool n
274 274
             if (!no_move) {
275 275
 
276 276
               const float parkingposx[] = PARKING_EXTRUDER_PARKING_X,
277
-                          midpos = ((parkingposx[1] - parkingposx[0])/2) + parkingposx[0] + hotend_offset[X_AXIS][active_extruder],
277
+                          midpos = (parkingposx[0] + parkingposx[1]) * 0.5 + hotend_offset[X_AXIS][active_extruder],
278 278
                           grabpos = parkingposx[tmp_extruder] + hotend_offset[X_AXIS][active_extruder]
279 279
                                     + (tmp_extruder == 0 ? -(PARKING_EXTRUDER_GRAB_DISTANCE) : PARKING_EXTRUDER_GRAB_DISTANCE);
280 280
               /**

Loading…
Cancel
Save