From 8ff338c2b99e2f880cfa60031e48545f59631d77 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sun, 11 Sep 2016 20:18:52 -0500 Subject: [PATCH] Patch stepper.h for SCARA --- Marlin/stepper.h | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/Marlin/stepper.h b/Marlin/stepper.h index 4a2287c7d7..d7507aff2c 100644 --- a/Marlin/stepper.h +++ b/Marlin/stepper.h @@ -91,6 +91,11 @@ class Stepper { static bool performing_homing; #endif + // + // Positions of stepper motors, in step units + // + static volatile long count_position[NUM_AXIS]; + private: 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; #endif - // - // Positions of stepper motors, in step units - // - static volatile long count_position[NUM_AXIS]; - // // Current direction of stepper motors (+1 or -1) // @@ -211,6 +211,13 @@ class Stepper { // 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 // to notify the subsystem that it is time to go to work.