Skip to content

Commit

Permalink
Update M666.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
InsanityAutomation committed Jan 2, 2020
1 parent 8f19927 commit 2cb9452
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions Marlin/src/gcode/calibrate/M666.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,20 +70,15 @@
#if ENABLED(Y_DUAL_ENDSTOPS)
if (parser.seenval('Y')) endstops.y2_endstop_adj = parser.value_linear_units();
#endif
#if ENABLED(Z_QUAD_ENDSTOPS)
if (parser.seenval('Z')) {
const float z_adj = parser.value_linear_units();
const int ind = parser.intval('S');
if (!ind || ind == 2) endstops.z2_endstop_adj = z_adj;
if (!ind || ind == 3) endstops.z3_endstop_adj = z_adj;
if (!ind || ind == 4) endstops.z4_endstop_adj = z_adj;
}
#elif ENABLED(Z_TRIPLE_ENDSTOPS)
#if ANY(Z_TRIPLE_ENDSTOPS, Z_QUAD_ENDSTOPS)
if (parser.seenval('Z')) {
const float z_adj = parser.value_linear_units();
const int ind = parser.intval('S');
if (!ind || ind == 2) endstops.z2_endstop_adj = z_adj;
if (!ind || ind == 3) endstops.z3_endstop_adj = z_adj;
#if ENABLED(ENABLED(Z_QUAD_ENDSTOPS))
if (!ind || ind == 4) endstops.z4_endstop_adj = z_adj;
#endif
}
#elif Z_MULTI_ENDSTOPS
if (parser.seen('Z')) endstops.z2_endstop_adj = parser.value_linear_units();
Expand Down

0 comments on commit 2cb9452

Please sign in to comment.