M218: report with no parameters
This commit is contained in:
parent
18de11c1ea
commit
5b45aab262
2 changed files with 27 additions and 15 deletions
|
@ -38,13 +38,24 @@
|
|||
void GcodeSuite::M218() {
|
||||
if (get_target_extruder_from_command() || target_extruder == 0) return;
|
||||
|
||||
if (parser.seenval('X')) hotend_offset[X_AXIS][target_extruder] = parser.value_linear_units();
|
||||
if (parser.seenval('Y')) hotend_offset[Y_AXIS][target_extruder] = parser.value_linear_units();
|
||||
bool report = true;
|
||||
if (parser.seenval('X')) {
|
||||
hotend_offset[X_AXIS][target_extruder] = parser.value_linear_units();
|
||||
report = false;
|
||||
}
|
||||
if (parser.seenval('Y')) {
|
||||
hotend_offset[Y_AXIS][target_extruder] = parser.value_linear_units();
|
||||
report = false;
|
||||
}
|
||||
|
||||
#if ENABLED(DUAL_X_CARRIAGE) || ENABLED(SWITCHING_NOZZLE) || ENABLED(PARKING_EXTRUDER)
|
||||
if (parser.seenval('Z')) hotend_offset[Z_AXIS][target_extruder] = parser.value_linear_units();
|
||||
if (parser.seenval('Z')) {
|
||||
hotend_offset[Z_AXIS][target_extruder] = parser.value_linear_units();
|
||||
report = false;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (report) {
|
||||
SERIAL_ECHO_START();
|
||||
SERIAL_ECHOPGM(MSG_HOTEND_OFFSET);
|
||||
HOTEND_LOOP() {
|
||||
|
@ -58,6 +69,7 @@ void GcodeSuite::M218() {
|
|||
#endif
|
||||
}
|
||||
SERIAL_EOL();
|
||||
}
|
||||
}
|
||||
|
||||
#endif // HOTENDS > 1
|
||||
|
|
|
@ -161,7 +161,7 @@
|
|||
* M209 - Turn Automatic Retract Detection on/off: S<0|1> (For slicers that don't support G10/11). (Requires FWRETRACT)
|
||||
Every normal extrude-only move will be classified as retract depending on the direction.
|
||||
* M211 - Enable, Disable, and/or Report software endstops: S<0|1> (Requires MIN_SOFTWARE_ENDSTOPS or MAX_SOFTWARE_ENDSTOPS)
|
||||
* M218 - Set a tool offset: "M218 T<index> X<offset> Y<offset>". (Requires 2 or more extruders)
|
||||
* M218 - Set/get a tool offset: "M218 T<index> X<offset> Y<offset>". (Requires 2 or more extruders)
|
||||
* M220 - Set Feedrate Percentage: "M220 S<percent>" (i.e., "FR" on the LCD)
|
||||
* M221 - Set Flow Percentage: "M221 S<percent>"
|
||||
* M226 - Wait until a pin is in a given state: "M226 P<pin> S<state>"
|
||||
|
|
Reference in a new issue