Browse Source

Fix babystep include, typos in stepper.cpp

Fix #16881
Scott Lahteine 4 years ago
parent
commit
99a5074372
3 changed files with 9 additions and 5 deletions
  1. 1
    1
      Marlin/src/feature/babystep.cpp
  2. 7
    3
      Marlin/src/module/stepper.cpp
  3. 1
    1
      Marlin/src/module/stepper.h

+ 1
- 1
Marlin/src/feature/babystep.cpp View File

44
 void Babystep::step_axis(const AxisEnum axis) {
44
 void Babystep::step_axis(const AxisEnum axis) {
45
   const int16_t curTodo = steps[BS_TODO_AXIS(axis)]; // get rid of volatile for performance
45
   const int16_t curTodo = steps[BS_TODO_AXIS(axis)]; // get rid of volatile for performance
46
   if (curTodo) {
46
   if (curTodo) {
47
-    stepper.babystep((AxisEnum)axis, curTodo > 0);
47
+    stepper.do_babystep((AxisEnum)axis, curTodo > 0);
48
     if (curTodo > 0) steps[BS_TODO_AXIS(axis)]--; else steps[BS_TODO_AXIS(axis)]++;
48
     if (curTodo > 0) steps[BS_TODO_AXIS(axis)]--; else steps[BS_TODO_AXIS(axis)]++;
49
   }
49
   }
50
 }
50
 }

+ 7
- 3
Marlin/src/module/stepper.cpp View File

101
 #include "../MarlinCore.h"
101
 #include "../MarlinCore.h"
102
 #include "../HAL/shared/Delay.h"
102
 #include "../HAL/shared/Delay.h"
103
 
103
 
104
+#if ENABLED(INTEGRATED_BABYSTEPPING)
105
+  #include "../feature/babystep.h"
106
+#endif
107
+
104
 #if MB(ALLIGATOR)
108
 #if MB(ALLIGATOR)
105
   #include "../feature/dac/dac_dac084s085.h"
109
   #include "../feature/dac/dac_dac084s085.h"
106
 #endif
110
 #endif
1373
 
1377
 
1374
     #if ENABLED(INTEGRATED_BABYSTEPPING)
1378
     #if ENABLED(INTEGRATED_BABYSTEPPING)
1375
       if (do_babystep)                                  // Avoid ANY stepping too soon after baby-stepping
1379
       if (do_babystep)                                  // Avoid ANY stepping too soon after baby-stepping
1376
-        NOLESS(nextMainISR, (BABYSTEP_TICKS) / 8)       // FULL STOP for 125µs after a baby-step
1380
+        NOLESS(nextMainISR, (BABYSTEP_TICKS) / 8);      // FULL STOP for 125µs after a baby-step
1377
 
1381
 
1378
       if (nextBabystepISR != BABYSTEP_NEVER)            // Avoid baby-stepping too close to axis Stepping
1382
       if (nextBabystepISR != BABYSTEP_NEVER)            // Avoid baby-stepping too close to axis Stepping
1379
-        NOLESS(nextBabystepISR, nextMainISR / 2)        // TODO: Only look at axes enabled for baby-stepping
1383
+        NOLESS(nextBabystepISR, nextMainISR / 2);       // TODO: Only look at axes enabled for baby-stepping
1380
     #endif
1384
     #endif
1381
 
1385
 
1382
     // Get the interval to the next ISR call
1386
     // Get the interval to the next ISR call
2544
 
2548
 
2545
   // MUST ONLY BE CALLED BY AN ISR,
2549
   // MUST ONLY BE CALLED BY AN ISR,
2546
   // No other ISR should ever interrupt this!
2550
   // No other ISR should ever interrupt this!
2547
-  void Stepper::babystep(const AxisEnum axis, const bool direction) {
2551
+  void Stepper::do_babystep(const AxisEnum axis, const bool direction) {
2548
 
2552
 
2549
     #if DISABLED(INTEGRATED_BABYSTEPPING)
2553
     #if DISABLED(INTEGRATED_BABYSTEPPING)
2550
       cli();
2554
       cli();

+ 1
- 1
Marlin/src/module/stepper.h View File

471
     #endif
471
     #endif
472
 
472
 
473
     #if ENABLED(BABYSTEPPING)
473
     #if ENABLED(BABYSTEPPING)
474
-      static void babystep(const AxisEnum axis, const bool direction); // perform a short step with a single stepper motor, outside of any convention
474
+      static void do_babystep(const AxisEnum axis, const bool direction); // perform a short step with a single stepper motor, outside of any convention
475
     #endif
475
     #endif
476
 
476
 
477
     #if HAS_MOTOR_CURRENT_PWM
477
     #if HAS_MOTOR_CURRENT_PWM

Loading…
Cancel
Save