Browse Source

Fix M290 boolval bug

Fix #8577
pull/1/head
Scott Lahteine 7 years ago
parent
commit
4793c34c53
  1. 4
      Marlin/src/gcode/motion/M290.cpp

4
Marlin/src/gcode/motion/M290.cpp

@ -52,7 +52,7 @@ void GcodeSuite::M290() {
const float offs = constrain(parser.value_axis_units((AxisEnum)a), -2, 2); const float offs = constrain(parser.value_axis_units((AxisEnum)a), -2, 2);
thermalManager.babystep_axis((AxisEnum)a, offs * planner.axis_steps_per_mm[a]); thermalManager.babystep_axis((AxisEnum)a, offs * planner.axis_steps_per_mm[a]);
#if ENABLED(BABYSTEP_ZPROBE_OFFSET) #if ENABLED(BABYSTEP_ZPROBE_OFFSET)
if (a == Z_AXIS && parser.boolval('P', true)) mod_zprobe_zoffset(offs); if (a == Z_AXIS && (!parser.seen('P') || parser.value_bool())) mod_zprobe_zoffset(offs);
#endif #endif
} }
#else #else
@ -60,7 +60,7 @@ void GcodeSuite::M290() {
const float offs = constrain(parser.value_axis_units(Z_AXIS), -2, 2); const float offs = constrain(parser.value_axis_units(Z_AXIS), -2, 2);
thermalManager.babystep_axis(Z_AXIS, offs * planner.axis_steps_per_mm[Z_AXIS]); thermalManager.babystep_axis(Z_AXIS, offs * planner.axis_steps_per_mm[Z_AXIS]);
#if ENABLED(BABYSTEP_ZPROBE_OFFSET) #if ENABLED(BABYSTEP_ZPROBE_OFFSET)
if (parser.boolval('P', true)) mod_zprobe_zoffset(offs); if (!parser.seen('P') || parser.value_bool()) mod_zprobe_zoffset(offs);
#endif #endif
} }
#endif #endif

Loading…
Cancel
Save