Move Stepper::synchronize to Planner (#10713)
Co-Authored-By: ejtagle <ejtagle@hotmail.com>
This commit is contained in:
@ -183,11 +183,6 @@ class Stepper {
|
||||
static void advance_isr_scheduler();
|
||||
#endif
|
||||
|
||||
//
|
||||
// Block until all buffered steps are executed
|
||||
//
|
||||
static void synchronize();
|
||||
|
||||
//
|
||||
// Set the current position in steps
|
||||
//
|
||||
@ -196,14 +191,14 @@ class Stepper {
|
||||
FORCE_INLINE static void _set_position(const AxisEnum a, const int32_t &v) { count_position[a] = v; }
|
||||
|
||||
FORCE_INLINE static void set_position(const int32_t &a, const int32_t &b, const int32_t &c, const int32_t &e) {
|
||||
synchronize();
|
||||
planner.synchronize();
|
||||
CRITICAL_SECTION_START;
|
||||
_set_position(a, b, c, e);
|
||||
CRITICAL_SECTION_END;
|
||||
}
|
||||
|
||||
static void set_position(const AxisEnum a, const int32_t &v) {
|
||||
synchronize();
|
||||
planner.synchronize();
|
||||
CRITICAL_SECTION_START;
|
||||
count_position[a] = v;
|
||||
CRITICAL_SECTION_END;
|
||||
@ -212,7 +207,7 @@ class Stepper {
|
||||
FORCE_INLINE static void _set_e_position(const int32_t &e) { count_position[E_AXIS] = e; }
|
||||
|
||||
static void set_e_position(const int32_t &e) {
|
||||
synchronize();
|
||||
planner.synchronize();
|
||||
CRITICAL_SECTION_START;
|
||||
count_position[E_AXIS] = e;
|
||||
CRITICAL_SECTION_END;
|
||||
|
Reference in New Issue
Block a user