Option to show babysteps total since G28 (#13580)
This commit is contained in:
@ -428,7 +428,7 @@ void GcodeSuite::G28(const bool always_home_all) {
|
||||
|
||||
// Restore the active tool after homing
|
||||
#if HOTENDS > 1 && (DISABLED(DELTA) || ENABLED(DELTA_HOME_TO_SAFE_ZONE))
|
||||
#if ENABLED(PARKING_EXTRUDER) || ENABLED(DUAL_X_CARRIAGE)
|
||||
#if EITHER(PARKING_EXTRUDER, DUAL_X_CARRIAGE)
|
||||
#define NO_FETCH false // fetch the previous toolhead
|
||||
#else
|
||||
#define NO_FETCH true
|
||||
|
@ -25,6 +25,7 @@
|
||||
#if ENABLED(BABYSTEPPING)
|
||||
|
||||
#include "../gcode.h"
|
||||
#include "../../feature/babystep.h"
|
||||
#include "../../module/probe.h"
|
||||
#include "../../module/temperature.h"
|
||||
#include "../../module/planner.h"
|
||||
@ -64,7 +65,7 @@ void GcodeSuite::M290() {
|
||||
for (uint8_t a = X_AXIS; a <= Z_AXIS; a++)
|
||||
if (parser.seenval(axis_codes[a]) || (a == Z_AXIS && parser.seenval('S'))) {
|
||||
const float offs = constrain(parser.value_axis_units((AxisEnum)a), -2, 2);
|
||||
thermalManager.babystep_axis((AxisEnum)a, offs * planner.settings.axis_steps_per_mm[a]);
|
||||
babystep.add_mm((AxisEnum)a, offs);
|
||||
#if ENABLED(BABYSTEP_ZPROBE_OFFSET)
|
||||
if (a == Z_AXIS && (!parser.seen('P') || parser.value_bool())) mod_zprobe_zoffset(offs);
|
||||
#endif
|
||||
@ -72,7 +73,7 @@ void GcodeSuite::M290() {
|
||||
#else
|
||||
if (parser.seenval('Z') || parser.seenval('S')) {
|
||||
const float offs = constrain(parser.value_axis_units(Z_AXIS), -2, 2);
|
||||
thermalManager.babystep_axis(Z_AXIS, offs * planner.settings.axis_steps_per_mm[Z_AXIS]);
|
||||
babystep.add_mm(Z_AXIS, offs);
|
||||
#if ENABLED(BABYSTEP_ZPROBE_OFFSET)
|
||||
if (!parser.seen('P') || parser.value_bool()) mod_zprobe_zoffset(offs);
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user