diff --git a/Marlin/src/gcode/motion/M290.cpp b/Marlin/src/gcode/motion/M290.cpp index 45817f59f5..c0500bf1de 100644 --- a/Marlin/src/gcode/motion/M290.cpp +++ b/Marlin/src/gcode/motion/M290.cpp @@ -36,7 +36,7 @@ void GcodeSuite::M290() { #if ENABLED(BABYSTEP_XY) for (uint8_t a = X_AXIS; a <= Z_AXIS; a++) if (parser.seenval(axis_codes[a]) || (a == Z_AXIS && parser.seenval('S'))) { - float offs = constrain(parser.value_axis_units(a), -2, 2); + const float offs = constrain(parser.value_axis_units(a), -2, 2); #if ENABLED(BABYSTEP_ZPROBE_OFFSET) if (a == Z_AXIS) { zprobe_zoffset += offs; @@ -47,7 +47,7 @@ void GcodeSuite::M290() { } #else if (parser.seenval('Z') || parser.seenval('S')) { - float offs = constrain(parser.value_axis_units(Z_AXIS), -2, 2); + const float offs = constrain(parser.value_axis_units(Z_AXIS), -2, 2); #if ENABLED(BABYSTEP_ZPROBE_OFFSET) zprobe_zoffset += offs; refresh_zprobe_zoffset(); // This will babystep the axis