Skip to content
Snippets Groups Projects
Commit fadf9eb2 authored by Scott Lahteine's avatar Scott Lahteine
Browse files

Simplify midpos calculation

parent 0880031e
Branches
Tags
No related merge requests found
...@@ -274,7 +274,7 @@ void tool_change(const uint8_t tmp_extruder, const float fr_mm_s/*=0.0*/, bool n ...@@ -274,7 +274,7 @@ void tool_change(const uint8_t tmp_extruder, const float fr_mm_s/*=0.0*/, bool n
if (!no_move) { if (!no_move) {
const float parkingposx[] = PARKING_EXTRUDER_PARKING_X, const float parkingposx[] = PARKING_EXTRUDER_PARKING_X,
midpos = ((parkingposx[1] - parkingposx[0])/2) + parkingposx[0] + hotend_offset[X_AXIS][active_extruder], midpos = (parkingposx[0] + parkingposx[1]) * 0.5 + hotend_offset[X_AXIS][active_extruder],
grabpos = parkingposx[tmp_extruder] + hotend_offset[X_AXIS][active_extruder] grabpos = parkingposx[tmp_extruder] + hotend_offset[X_AXIS][active_extruder]
+ (tmp_extruder == 0 ? -(PARKING_EXTRUDER_GRAB_DISTANCE) : PARKING_EXTRUDER_GRAB_DISTANCE); + (tmp_extruder == 0 ? -(PARKING_EXTRUDER_GRAB_DISTANCE) : PARKING_EXTRUDER_GRAB_DISTANCE);
/** /**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment