🩹 Fix some parameters w/out values (#24051)
This commit is contained in:
committed by
Scott Lahteine
parent
85599abba7
commit
ecfe7b6400
@ -128,17 +128,8 @@ void GcodeSuite::M17() {
|
||||
stepper.enable_e_steppers();
|
||||
}
|
||||
#endif
|
||||
NUM_AXIS_CODE(
|
||||
if (parser.seen_test('X')) stepper.enable_axis(X_AXIS),
|
||||
if (parser.seen_test('Y')) stepper.enable_axis(Y_AXIS),
|
||||
if (parser.seen_test('Z')) stepper.enable_axis(Z_AXIS),
|
||||
if (parser.seen_test(AXIS4_NAME)) stepper.enable_axis(I_AXIS),
|
||||
if (parser.seen_test(AXIS5_NAME)) stepper.enable_axis(J_AXIS),
|
||||
if (parser.seen_test(AXIS6_NAME)) stepper.enable_axis(K_AXIS),
|
||||
if (parser.seen_test(AXIS7_NAME)) stepper.enable_axis(U_AXIS),
|
||||
if (parser.seen_test(AXIS8_NAME)) stepper.enable_axis(V_AXIS),
|
||||
if (parser.seen_test(AXIS9_NAME)) stepper.enable_axis(W_AXIS)
|
||||
);
|
||||
LOOP_NUM_AXES(a)
|
||||
if (parser.seen_test(AXIS_CHAR(a))) stepper.enable_axis((AxisEnum)a);
|
||||
}
|
||||
}
|
||||
else {
|
||||
@ -244,17 +235,8 @@ void GcodeSuite::M18_M84() {
|
||||
stepper.disable_e_steppers();
|
||||
}
|
||||
#endif
|
||||
NUM_AXIS_CODE(
|
||||
if (parser.seen_test('X')) stepper.disable_axis(X_AXIS),
|
||||
if (parser.seen_test('Y')) stepper.disable_axis(Y_AXIS),
|
||||
if (parser.seen_test('Z')) stepper.disable_axis(Z_AXIS),
|
||||
if (parser.seen_test(AXIS4_NAME)) stepper.disable_axis(I_AXIS),
|
||||
if (parser.seen_test(AXIS5_NAME)) stepper.disable_axis(J_AXIS),
|
||||
if (parser.seen_test(AXIS6_NAME)) stepper.disable_axis(K_AXIS),
|
||||
if (parser.seen_test(AXIS7_NAME)) stepper.disable_axis(U_AXIS),
|
||||
if (parser.seen_test(AXIS8_NAME)) stepper.disable_axis(V_AXIS),
|
||||
if (parser.seen_test(AXIS9_NAME)) stepper.disable_axis(W_AXIS)
|
||||
);
|
||||
LOOP_NUM_AXES(a)
|
||||
if (parser.seen_test(AXIS_CHAR(a))) stepper.disable_axis((AxisEnum)a);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -48,7 +48,7 @@ void GcodeSuite::M280() {
|
||||
const int anew = parser.value_int();
|
||||
if (anew >= 0) {
|
||||
#if ENABLED(POLARGRAPH)
|
||||
if (parser.seen('T')) { // (ms) Total duration of servo move
|
||||
if (parser.seenval('T')) { // (ms) Total duration of servo move
|
||||
const int16_t t = constrain(parser.value_int(), 0, 10000);
|
||||
const int aold = servo[servo_index].read();
|
||||
millis_t now = millis();
|
||||
|
@ -93,7 +93,7 @@ void GcodeSuite::M3_M4(const bool is_M4) {
|
||||
// Laser power in inline mode
|
||||
cutter.inline_direction(is_M4); // Should always be unused
|
||||
#if ENABLED(SPINDLE_LASER_USE_PWM)
|
||||
if (parser.seen('O')) {
|
||||
if (parser.seenval('O')) {
|
||||
cutter.unitPower = cutter.power_to_range(parser.value_byte(), 0);
|
||||
cutter.inline_ocr_power(cutter.unitPower); // The OCR is a value from 0 to 255 (uint8_t)
|
||||
}
|
||||
|
@ -41,7 +41,7 @@
|
||||
*/
|
||||
void GcodeSuite::M350() {
|
||||
if (parser.seen('S')) LOOP_DISTINCT_AXES(i) stepper.microstep_mode(i, parser.value_byte());
|
||||
LOOP_LOGICAL_AXES(i) if (parser.seen(AXIS_CHAR(i))) stepper.microstep_mode(i, parser.value_byte());
|
||||
LOOP_LOGICAL_AXES(i) if (parser.seenval(AXIS_CHAR(i))) stepper.microstep_mode(i, parser.value_byte());
|
||||
TERN_(HAS_M350_B_PARAM, if (parser.seenval('B')) stepper.microstep_mode(E_AXIS + 1, parser.value_byte()));
|
||||
stepper.microstep_readings();
|
||||
}
|
||||
|
@ -64,7 +64,7 @@
|
||||
void GcodeSuite::M605() {
|
||||
planner.synchronize();
|
||||
|
||||
if (parser.seen('S')) {
|
||||
if (parser.seenval('S')) {
|
||||
const DualXMode previous_mode = dual_x_carriage_mode;
|
||||
|
||||
dual_x_carriage_mode = (DualXMode)parser.value_byte();
|
||||
@ -78,8 +78,8 @@
|
||||
|
||||
case DXC_DUPLICATION_MODE:
|
||||
// Set the X offset, but no less than the safety gap
|
||||
if (parser.seen('X')) duplicate_extruder_x_offset = _MAX(parser.value_linear_units(), (X2_MIN_POS) - (X1_MIN_POS));
|
||||
if (parser.seen('R')) duplicate_extruder_temp_offset = parser.value_celsius_diff();
|
||||
if (parser.seenval('X')) duplicate_extruder_x_offset = _MAX(parser.value_linear_units(), (X2_MIN_POS) - (X1_MIN_POS));
|
||||
if (parser.seenval('R')) duplicate_extruder_temp_offset = parser.value_celsius_diff();
|
||||
// Always switch back to tool 0
|
||||
if (active_extruder != 0) tool_change(0);
|
||||
break;
|
||||
|
Reference in New Issue
Block a user