From 3825fe3834ab7702a3689dc8f4eb2cf5a42542c6 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Mon, 20 May 2024 00:41:16 -0500 Subject: [PATCH] document --- Marlin/src/gcode/geometry/M206_M428.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Marlin/src/gcode/geometry/M206_M428.cpp b/Marlin/src/gcode/geometry/M206_M428.cpp index 33cab52cf6..2ae54a83af 100644 --- a/Marlin/src/gcode/geometry/M206_M428.cpp +++ b/Marlin/src/gcode/geometry/M206_M428.cpp @@ -80,6 +80,10 @@ void GcodeSuite::M206_report(const bool forReplay/*=true*/) { * M428 can't be used more than 2cm away from 0 or an endstop. * * Use M206 to set these values directly. + * + * Parameters: + * X, Y, Z, ... - Flags to set the home offset for only the specified axes + * P - Flag to add the distance to the existing home offset */ void GcodeSuite::M428() { if (homing_needed_error()) return; @@ -104,7 +108,7 @@ void GcodeSuite::M428() { diff[i] = 0; } - LOOP_NUM_AXES(i) set_home_offset((AxisEnum)i, diff[i] + adding ? home_offset[i] : 0); + LOOP_NUM_AXES(i) set_home_offset((AxisEnum)i, diff[i] + (adding ? home_offset[i] : 0)); report_current_position(); LCD_MESSAGE(MSG_HOME_OFFSETS_APPLIED);