Browse Source

Patch stepper.h for SCARA

Scott Lahteine 7 years ago
parent
commit
8ff338c2b9
1 changed files with 12 additions and 5 deletions
  1. 12
    5
      Marlin/stepper.h

+ 12
- 5
Marlin/stepper.h View File

@@ -91,6 +91,11 @@ class Stepper {
91 91
       static bool performing_homing;
92 92
     #endif
93 93
 
94
+    //
95
+    // Positions of stepper motors, in step units
96
+    //
97
+    static volatile long count_position[NUM_AXIS];
98
+
94 99
   private:
95 100
 
96 101
     static unsigned char last_direction_bits;        // The next stepping-bits to be output
@@ -139,11 +144,6 @@ class Stepper {
139 144
     #endif
140 145
 
141 146
     //
142
-    // Positions of stepper motors, in step units
143
-    //
144
-    static volatile long count_position[NUM_AXIS];
145
-
146
-    //
147 147
     // Current direction of stepper motors (+1 or -1)
148 148
     //
149 149
     static volatile signed char count_direction[NUM_AXIS];
@@ -212,6 +212,13 @@ class Stepper {
212 212
     static float get_axis_position_mm(AxisEnum axis);
213 213
 
214 214
     //
215
+    // SCARA AB axes are in degrees, not mm
216
+    //
217
+    #if IS_SCARA
218
+      static FORCE_INLINE float get_axis_position_degrees(AxisEnum axis) { return get_axis_position_mm(axis); }
219
+    #endif
220
+
221
+    //
215 222
     // The stepper subsystem goes to sleep when it runs out of things to execute. Call this
216 223
     // to notify the subsystem that it is time to go to work.
217 224
     //

Loading…
Cancel
Save