浏览代码

Fix M290 boolval bug

Fix #8577
Scott Lahteine 7 年前
父节点
当前提交
46776de90b
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2
    2
      Marlin/Marlin_main.cpp

+ 2
- 2
Marlin/Marlin_main.cpp 查看文件

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

正在加载...
取消
保存