Browse Source

Fix M290 boolval bug

Fix #8577
Scott Lahteine 7 years ago
parent
commit
46776de90b
1 changed files with 2 additions and 2 deletions
  1. 2
    2
      Marlin/Marlin_main.cpp

+ 2
- 2
Marlin/Marlin_main.cpp View File

9346
           const float offs = constrain(parser.value_axis_units((AxisEnum)a), -2, 2);
9346
           const float offs = constrain(parser.value_axis_units((AxisEnum)a), -2, 2);
9347
           thermalManager.babystep_axis((AxisEnum)a, offs * planner.axis_steps_per_mm[a]);
9347
           thermalManager.babystep_axis((AxisEnum)a, offs * planner.axis_steps_per_mm[a]);
9348
           #if ENABLED(BABYSTEP_ZPROBE_OFFSET)
9348
           #if ENABLED(BABYSTEP_ZPROBE_OFFSET)
9349
-            if (a == Z_AXIS && parser.boolval('P', true)) mod_zprobe_zoffset(offs);
9349
+            if (a == Z_AXIS && (!parser.seen('P') || parser.value_bool())) mod_zprobe_zoffset(offs);
9350
           #endif
9350
           #endif
9351
         }
9351
         }
9352
     #else
9352
     #else
9354
         const float offs = constrain(parser.value_axis_units(Z_AXIS), -2, 2);
9354
         const float offs = constrain(parser.value_axis_units(Z_AXIS), -2, 2);
9355
         thermalManager.babystep_axis(Z_AXIS, offs * planner.axis_steps_per_mm[Z_AXIS]);
9355
         thermalManager.babystep_axis(Z_AXIS, offs * planner.axis_steps_per_mm[Z_AXIS]);
9356
         #if ENABLED(BABYSTEP_ZPROBE_OFFSET)
9356
         #if ENABLED(BABYSTEP_ZPROBE_OFFSET)
9357
-          if (parser.boolval('P', true)) mod_zprobe_zoffset(offs);
9357
+          if (!parser.seen('P') || parser.value_bool()) mod_zprobe_zoffset(offs);
9358
         #endif
9358
         #endif
9359
       }
9359
       }
9360
     #endif
9360
     #endif

Loading…
Cancel
Save