0
0
Fork 0
mirror of https://github.com/MarlinFirmware/Marlin.git synced 2025-01-17 23:18:34 +00:00

Stepper::set_position needed for some applications

This commit is contained in:
Scott Lahteine 2018-05-21 15:23:00 -05:00
parent f5a4cd76fb
commit e0ae9b8548

View file

@ -265,6 +265,21 @@ class Stepper {
static void refresh_motor_power();
#endif
// Set the current position in steps
inline static void set_position(const int32_t &a, const int32_t &b, const int32_t &c, const int32_t &e) {
planner.synchronize();
CRITICAL_SECTION_START;
_set_position(a, b, c, e);
CRITICAL_SECTION_END;
}
inline static void set_position(const AxisEnum a, const int32_t &v) {
planner.synchronize();
CRITICAL_SECTION_START;
count_position[a] = v;
CRITICAL_SECTION_END;
}
private:
// Set the current position in steps