Patch up M290, M851

This commit is contained in:
Scott Lahteine
2017-11-25 14:00:39 -06:00
parent d29cb646e3
commit be00e421a7
3 changed files with 16 additions and 11 deletions

View File

@ -29,6 +29,10 @@
#include "../../module/temperature.h"
#include "../../module/planner.h"
#if ENABLED(BABYSTEP_ZPROBE_OFFSET)
#include "../../core/serial.h"
#endif
/**
* M290: Babystepping
*/
@ -39,7 +43,7 @@ void GcodeSuite::M290() {
const float offs = constrain(parser.value_axis_units((AxisEnum)a), -2, 2);
thermalManager.babystep_axis((AxisEnum)a, offs * planner.axis_steps_per_mm[a]);
#if ENABLED(BABYSTEP_ZPROBE_OFFSET)
zprobe_zoffset += offs;
if (a == Z_AXIS) zprobe_zoffset += offs;
#endif
}
#else
@ -51,6 +55,10 @@ void GcodeSuite::M290() {
#endif
}
#endif
#if ENABLED(BABYSTEP_ZPROBE_OFFSET)
SERIAL_ECHO_START();
SERIAL_ECHOLNPAIR(MSG_PROBE_Z_OFFSET ": ", zprobe_zoffset);
#endif
}
#endif // BABYSTEPPING