Browse Source

Patch stepper.h for SCARA

Scott Lahteine 8 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
       static bool performing_homing;
91
       static bool performing_homing;
92
     #endif
92
     #endif
93
 
93
 
94
+    //
95
+    // Positions of stepper motors, in step units
96
+    //
97
+    static volatile long count_position[NUM_AXIS];
98
+
94
   private:
99
   private:
95
 
100
 
96
     static unsigned char last_direction_bits;        // The next stepping-bits to be output
101
     static unsigned char last_direction_bits;        // The next stepping-bits to be output
139
     #endif
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
     // Current direction of stepper motors (+1 or -1)
147
     // Current direction of stepper motors (+1 or -1)
148
     //
148
     //
149
     static volatile signed char count_direction[NUM_AXIS];
149
     static volatile signed char count_direction[NUM_AXIS];
212
     static float get_axis_position_mm(AxisEnum axis);
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
     // The stepper subsystem goes to sleep when it runs out of things to execute. Call this
222
     // The stepper subsystem goes to sleep when it runs out of things to execute. Call this
216
     // to notify the subsystem that it is time to go to work.
223
     // to notify the subsystem that it is time to go to work.
217
     //
224
     //

Loading…
Cancel
Save