Patch stepper.h for SCARA

This commit is contained in:
Scott Lahteine 2016-09-11 20:18:52 -05:00
parent 74d7f5e57b
commit 8ff338c2b9

View file

@ -91,6 +91,11 @@ class Stepper {
static bool performing_homing; static bool performing_homing;
#endif #endif
//
// Positions of stepper motors, in step units
//
static volatile long count_position[NUM_AXIS];
private: private:
static unsigned char last_direction_bits; // The next stepping-bits to be output static unsigned char last_direction_bits; // The next stepping-bits to be output
@ -138,11 +143,6 @@ class Stepper {
static constexpr int motor_current_setting[3] = PWM_MOTOR_CURRENT; static constexpr int motor_current_setting[3] = PWM_MOTOR_CURRENT;
#endif #endif
//
// Positions of stepper motors, in step units
//
static volatile long count_position[NUM_AXIS];
// //
// Current direction of stepper motors (+1 or -1) // Current direction of stepper motors (+1 or -1)
// //
@ -211,6 +211,13 @@ class Stepper {
// //
static float get_axis_position_mm(AxisEnum axis); static float get_axis_position_mm(AxisEnum axis);
//
// SCARA AB axes are in degrees, not mm
//
#if IS_SCARA
static FORCE_INLINE float get_axis_position_degrees(AxisEnum axis) { return get_axis_position_mm(axis); }
#endif
// //
// The stepper subsystem goes to sleep when it runs out of things to execute. Call this // The stepper subsystem goes to sleep when it runs out of things to execute. Call this
// to notify the subsystem that it is time to go to work. // to notify the subsystem that it is time to go to work.