|
@@ -9324,6 +9324,14 @@ inline void gcode_M226() {
|
9324
|
9324
|
|
9325
|
9325
|
#if ENABLED(BABYSTEPPING)
|
9326
|
9326
|
|
|
9327
|
+ #if ENABLED(BABYSTEP_ZPROBE_OFFSET)
|
|
9328
|
+ FORCE_INLINE void mod_zprobe_zoffset(const float &offs) {
|
|
9329
|
+ zprobe_zoffset += offs;
|
|
9330
|
+ SERIAL_ECHO_START();
|
|
9331
|
+ SERIAL_ECHOLNPAIR(MSG_PROBE_Z_OFFSET ": ", zprobe_zoffset);
|
|
9332
|
+ }
|
|
9333
|
+ #endif
|
|
9334
|
+
|
9327
|
9335
|
/**
|
9328
|
9336
|
* M290: Babystepping
|
9329
|
9337
|
*/
|
|
@@ -9334,7 +9342,7 @@ inline void gcode_M226() {
|
9334
|
9342
|
const float offs = constrain(parser.value_axis_units((AxisEnum)a), -2, 2);
|
9335
|
9343
|
thermalManager.babystep_axis((AxisEnum)a, offs * planner.axis_steps_per_mm[a]);
|
9336
|
9344
|
#if ENABLED(BABYSTEP_ZPROBE_OFFSET)
|
9337
|
|
- if (a == Z_AXIS) zprobe_zoffset += offs;
|
|
9345
|
+ if (a == Z_AXIS && parser.boolval('P', true)) mod_zprobe_zoffset(offs);
|
9338
|
9346
|
#endif
|
9339
|
9347
|
}
|
9340
|
9348
|
#else
|
|
@@ -9342,14 +9350,10 @@ inline void gcode_M226() {
|
9342
|
9350
|
const float offs = constrain(parser.value_axis_units(Z_AXIS), -2, 2);
|
9343
|
9351
|
thermalManager.babystep_axis(Z_AXIS, offs * planner.axis_steps_per_mm[Z_AXIS]);
|
9344
|
9352
|
#if ENABLED(BABYSTEP_ZPROBE_OFFSET)
|
9345
|
|
- zprobe_zoffset += offs;
|
|
9353
|
+ if (parser.boolval('P', true)) mod_zprobe_zoffset(offs);
|
9346
|
9354
|
#endif
|
9347
|
9355
|
}
|
9348
|
9356
|
#endif
|
9349
|
|
- #if ENABLED(BABYSTEP_ZPROBE_OFFSET)
|
9350
|
|
- SERIAL_ECHO_START();
|
9351
|
|
- SERIAL_ECHOLNPAIR(MSG_PROBE_Z_OFFSET ": ", zprobe_zoffset);
|
9352
|
|
- #endif
|
9353
|
9357
|
}
|
9354
|
9358
|
|
9355
|
9359
|
#endif // BABYSTEPPING
|