️ Use seen_test in M422

This commit is contained in:
Scott Lahteine 2022-03-02 17:58:23 -06:00
parent e082a141f6
commit 2986bc3b76

View File

@ -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;
}
@ -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;
}