Quellcode durchsuchen

Apply static to remaining stepper methods

Scott Lahteine vor 8 Jahren
Ursprung
Commit
81384dfd36
1 geänderte Dateien mit 24 neuen und 24 gelöschten Zeilen
  1. 24
    24
      Marlin/stepper.h

+ 24
- 24
Marlin/stepper.h Datei anzeigen

@@ -148,7 +148,7 @@ class Stepper {
148 148
     //
149 149
     // Initialize stepper hardware
150 150
     //
151
-    void init();
151
+    static void init();
152 152
 
153 153
     //
154 154
     // Interrupt Service Routines
@@ -163,13 +163,13 @@ class Stepper {
163 163
     //
164 164
     // Block until all buffered steps are executed
165 165
     //
166
-    void synchronize();
166
+    static void synchronize();
167 167
 
168 168
     //
169 169
     // Set the current position in steps
170 170
     //
171
-    void set_position(const long& x, const long& y, const long& z, const long& e);
172
-    void set_e_position(const long& e);
171
+    static void set_position(const long& x, const long& y, const long& z, const long& e);
172
+    static void set_e_position(const long& e);
173 173
 
174 174
     //
175 175
     // Set direction bits for all steppers
@@ -179,33 +179,33 @@ class Stepper {
179 179
     //
180 180
     // Get the position of a stepper, in steps
181 181
     //
182
-    long position(AxisEnum axis);
182
+    static long position(AxisEnum axis);
183 183
 
184 184
     //
185 185
     // Report the positions of the steppers, in steps
186 186
     //
187
-    void report_positions();
187
+    static void report_positions();
188 188
 
189 189
     //
190 190
     // Get the position (mm) of an axis based on stepper position(s)
191 191
     //
192
-    float get_axis_position_mm(AxisEnum axis);
192
+    static float get_axis_position_mm(AxisEnum axis);
193 193
 
194 194
     //
195 195
     // The stepper subsystem goes to sleep when it runs out of things to execute. Call this
196 196
     // to notify the subsystem that it is time to go to work.
197 197
     //
198
-    void wake_up();
198
+    static void wake_up();
199 199
 
200 200
     //
201 201
     // Wait for moves to finish and disable all steppers
202 202
     //
203
-    void finish_and_disable();
203
+    static void finish_and_disable();
204 204
 
205 205
     //
206 206
     // Quickly stop all steppers and clear the blocks queue
207 207
     //
208
-    void quick_stop();
208
+    static void quick_stop();
209 209
 
210 210
     //
211 211
     // The direction of a single motor
@@ -213,36 +213,36 @@ class Stepper {
213 213
     static FORCE_INLINE bool motor_direction(AxisEnum axis) { return TEST(last_direction_bits, axis); }
214 214
 
215 215
     #if HAS_DIGIPOTSS
216
-      void digitalPotWrite(int address, int value);
216
+      static void digitalPotWrite(int address, int value);
217 217
     #endif
218
-    void microstep_ms(uint8_t driver, int8_t ms1, int8_t ms2);
219
-    void digipot_current(uint8_t driver, int current);
220
-    void microstep_mode(uint8_t driver, uint8_t stepping);
221
-    void microstep_readings();
218
+    static void microstep_ms(uint8_t driver, int8_t ms1, int8_t ms2);
219
+    static void digipot_current(uint8_t driver, int current);
220
+    static void microstep_mode(uint8_t driver, uint8_t stepping);
221
+    static void microstep_readings();
222 222
 
223 223
     #if ENABLED(Z_DUAL_ENDSTOPS)
224
-      FORCE_INLINE void set_homing_flag(bool state) { performing_homing = state; }
225
-      FORCE_INLINE void set_z_lock(bool state) { locked_z_motor = state; }
226
-      FORCE_INLINE void set_z2_lock(bool state) { locked_z2_motor = state; }
224
+      static FORCE_INLINE void set_homing_flag(bool state) { performing_homing = state; }
225
+      static FORCE_INLINE void set_z_lock(bool state) { locked_z_motor = state; }
226
+      static FORCE_INLINE void set_z2_lock(bool state) { locked_z2_motor = state; }
227 227
     #endif
228 228
 
229 229
     #if ENABLED(BABYSTEPPING)
230
-      void babystep(const uint8_t axis, const bool direction); // perform a short step with a single stepper motor, outside of any convention
230
+      static void babystep(const uint8_t axis, const bool direction); // perform a short step with a single stepper motor, outside of any convention
231 231
     #endif
232 232
 
233
-    inline void kill_current_block() {
233
+    static inline void kill_current_block() {
234 234
       step_events_completed = current_block->step_event_count;
235 235
     }
236 236
 
237 237
     //
238 238
     // Handle a triggered endstop
239 239
     //
240
-    void endstop_triggered(AxisEnum axis);
240
+    static void endstop_triggered(AxisEnum axis);
241 241
 
242 242
     //
243 243
     // Triggered position of an axis in mm (not core-savvy)
244 244
     //
245
-    FORCE_INLINE float triggered_position_mm(AxisEnum axis) {
245
+    static FORCE_INLINE float triggered_position_mm(AxisEnum axis) {
246 246
       return endstops_trigsteps[axis] / planner.axis_steps_per_unit[axis];
247 247
     }
248 248
 
@@ -327,8 +327,8 @@ class Stepper {
327 327
       // SERIAL_ECHOLN(current_block->final_advance/256.0);
328 328
     }
329 329
 
330
-    void digipot_init();
331
-    void microstep_init();
330
+    static void digipot_init();
331
+    static void microstep_init();
332 332
 
333 333
 };
334 334
 

Laden…
Abbrechen
Speichern