Skip to content

Commit

Permalink
⚡️ Use seen_test in M422
Browse files Browse the repository at this point in the history
  • Loading branch information
thinkyhead committed Mar 2, 2022
1 parent bb2f100 commit 6aee2c7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Marlin/src/gcode/calibrate/G34_M422.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -486,9 +486,9 @@ void GcodeSuite::M422() {
return;
}

const bool is_probe_point = parser.seen('S');
const bool is_probe_point = parser.seen_test('S');

if (TERN0(HAS_Z_STEPPER_ALIGN_STEPPER_XY, is_probe_point && parser.seen('W'))) {
if (TERN0(HAS_Z_STEPPER_ALIGN_STEPPER_XY, is_probe_point && parser.seen_test('W'))) {
SERIAL_ECHOLNPGM("?(S) and (W) may not be combined.");
return;
}
Expand All @@ -498,7 +498,7 @@ void GcodeSuite::M422() {
z_stepper_align.xy
);

if (!is_probe_point && TERN1(HAS_Z_STEPPER_ALIGN_STEPPER_XY, !parser.seen('W'))) {
if (!is_probe_point && TERN1(HAS_Z_STEPPER_ALIGN_STEPPER_XY, !parser.seen_test('W'))) {
SERIAL_ECHOLNPGM("?(S)" TERN_(HAS_Z_STEPPER_ALIGN_STEPPER_XY, " or (W)") " is required.");
return;
}
Expand Down

0 comments on commit 6aee2c7

Please sign in to comment.