♻️ Refactor Linear / Logical / Distinct Axes (#21953)
* More patches supporting EXTRUDERS 0 * Extend types in prep for more axes
This commit is contained in:
committed by
Scott Lahteine
parent
f5f999d7bf
commit
4194cdda5b
@ -33,11 +33,13 @@
|
||||
* M17: Enable stepper motors
|
||||
*/
|
||||
void GcodeSuite::M17() {
|
||||
if (parser.seen("XYZE")) {
|
||||
if (parser.seen_test('X')) ENABLE_AXIS_X();
|
||||
if (parser.seen_test('Y')) ENABLE_AXIS_Y();
|
||||
if (parser.seen_test('Z')) ENABLE_AXIS_Z();
|
||||
if (TERN0(HAS_E_STEPPER_ENABLE, parser.seen_test('E'))) enable_e_steppers();
|
||||
if (parser.seen(LOGICAL_AXIS_GANG("E", "X", "Y", "Z"))) {
|
||||
LOGICAL_AXIS_CODE(
|
||||
if (TERN0(HAS_E_STEPPER_ENABLE, parser.seen_test('E'))) enable_e_steppers(),
|
||||
if (parser.seen_test('X')) ENABLE_AXIS_X(),
|
||||
if (parser.seen_test('Y')) ENABLE_AXIS_Y(),
|
||||
if (parser.seen_test('Z')) ENABLE_AXIS_Z()
|
||||
);
|
||||
}
|
||||
else {
|
||||
LCD_MESSAGEPGM(MSG_NO_MOVE);
|
||||
@ -54,12 +56,14 @@ void GcodeSuite::M18_M84() {
|
||||
stepper_inactive_time = parser.value_millis_from_seconds();
|
||||
}
|
||||
else {
|
||||
if (parser.seen("XYZE")) {
|
||||
if (parser.seen(LOGICAL_AXIS_GANG("E", "X", "Y", "Z"))) {
|
||||
planner.synchronize();
|
||||
if (parser.seen_test('X')) DISABLE_AXIS_X();
|
||||
if (parser.seen_test('Y')) DISABLE_AXIS_Y();
|
||||
if (parser.seen_test('Z')) DISABLE_AXIS_Z();
|
||||
if (TERN0(HAS_E_STEPPER_ENABLE, parser.seen_test('E'))) disable_e_steppers();
|
||||
LOGICAL_AXIS_CODE(
|
||||
if (TERN0(HAS_E_STEPPER_ENABLE, parser.seen_test('E'))) disable_e_steppers(),
|
||||
if (parser.seen_test('X')) DISABLE_AXIS_X(),
|
||||
if (parser.seen_test('Y')) DISABLE_AXIS_Y(),
|
||||
if (parser.seen_test('Z')) DISABLE_AXIS_Z()
|
||||
);
|
||||
}
|
||||
else
|
||||
planner.finish_and_disable();
|
||||
|
Reference in New Issue
Block a user