diff --git a/Marlin/src/feature/tmc_util.h b/Marlin/src/feature/tmc_util.h index 4753f78d91fef..c878d86faedda 100644 --- a/Marlin/src/feature/tmc_util.h +++ b/Marlin/src/feature/tmc_util.h @@ -360,13 +360,6 @@ void test_tmc_connection(LOGICAL_AXIS_DECL(const bool, true)); #if ENABLED(IMPROVE_HOMING_RELIABILITY) extern millis_t sg_guard_period; constexpr uint16_t default_sg_guard_duration = 400; - - struct motion_state_t { - xy_ulong_t acceleration; - #if HAS_CLASSIC_JERK - xy_float_t jerk_state; - #endif - }; #endif bool tmc_enable_stallguard(TMC2130Stepper &st); diff --git a/Marlin/src/gcode/calibrate/G28.cpp b/Marlin/src/gcode/calibrate/G28.cpp index 069461ca4aa9a..ca9cbb8cc9b8d 100644 --- a/Marlin/src/gcode/calibrate/G28.cpp +++ b/Marlin/src/gcode/calibrate/G28.cpp @@ -164,8 +164,8 @@ #if ENABLED(IMPROVE_HOMING_RELIABILITY) - motion_state_s begin_slow_homing() { - motion_state_s motion_state{0}; + motion_state_t begin_slow_homing() { + motion_state_t motion_state{0}; motion_state.acceleration.set(planner.settings.max_acceleration_mm_per_s2[X_AXIS], planner.settings.max_acceleration_mm_per_s2[Y_AXIS] OPTARG(DELTA, planner.settings.max_acceleration_mm_per_s2[Z_AXIS]) @@ -181,7 +181,7 @@ return motion_state; } - void end_slow_homing(const motion_state_s &motion_state) { + void end_slow_homing(const motion_state_t &motion_state) { planner.settings.max_acceleration_mm_per_s2[X_AXIS] = motion_state.acceleration.x; planner.settings.max_acceleration_mm_per_s2[Y_AXIS] = motion_state.acceleration.y; TERN_(DELTA, planner.settings.max_acceleration_mm_per_s2[Z_AXIS] = motion_state.acceleration.z); @@ -299,7 +299,7 @@ void GcodeSuite::G28() { #endif #if ENABLED(IMPROVE_HOMING_RELIABILITY) - motion_state_s saved_motion_state = begin_slow_homing(); + motion_state_t saved_motion_state = begin_slow_homing(); #endif // Always home with tool 0 active diff --git a/Marlin/src/module/planner.cpp b/Marlin/src/module/planner.cpp index ea9147b79ac2b..5db4e9e1a4cdc 100644 --- a/Marlin/src/module/planner.cpp +++ b/Marlin/src/module/planner.cpp @@ -1530,7 +1530,7 @@ void Planner::check_axes_activity() { #if ENABLED(IMPROVE_HOMING_RELIABILITY) void Planner::enable_stall_prevention(const bool onoff) { - static motion_state_s saved_motion_state; + static saved_motion_state_t saved_motion_state; if (onoff) { saved_motion_state.acceleration.x = settings.max_acceleration_mm_per_s2[X_AXIS]; saved_motion_state.acceleration.y = settings.max_acceleration_mm_per_s2[Y_AXIS]; diff --git a/Marlin/src/module/planner.h b/Marlin/src/module/planner.h index 702f0bbe249bf..9b104615f6f9f 100644 --- a/Marlin/src/module/planner.h +++ b/Marlin/src/module/planner.h @@ -282,7 +282,7 @@ typedef struct { } planner_settings_t; #if ENABLED(IMPROVE_HOMING_RELIABILITY) - struct motion_state_s { + struct motion_state_t { TERN(DELTA, xyz_ulong_t, xy_ulong_t) acceleration; #if HAS_CLASSIC_JERK TERN(DELTA, xyz_float_t, xy_float_t) jerk_state;