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,7 +44,7 @@ int16_t Babystep::accum;
44 44
 void Babystep::step_axis(const AxisEnum axis) {
45 45
   const int16_t curTodo = steps[BS_TODO_AXIS(axis)]; // get rid of volatile for performance
46 46
   if (curTodo) {
47
-    stepper.babystep((AxisEnum)axis, curTodo > 0);
47
+    stepper.do_babystep((AxisEnum)axis, curTodo > 0);
48 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,6 +101,10 @@ Stepper stepper; // Singleton
101 101
 #include "../MarlinCore.h"
102 102
 #include "../HAL/shared/Delay.h"
103 103
 
104
+#if ENABLED(INTEGRATED_BABYSTEPPING)
105
+  #include "../feature/babystep.h"
106
+#endif
107
+
104 108
 #if MB(ALLIGATOR)
105 109
   #include "../feature/dac/dac_dac084s085.h"
106 110
 #endif
@@ -1373,10 +1377,10 @@ void Stepper::isr() {
1373 1377
 
1374 1378
     #if ENABLED(INTEGRATED_BABYSTEPPING)
1375 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 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 1384
     #endif
1381 1385
 
1382 1386
     // Get the interval to the next ISR call
@@ -2544,7 +2548,7 @@ void Stepper::report_positions() {
2544 2548
 
2545 2549
   // MUST ONLY BE CALLED BY AN ISR,
2546 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 2553
     #if DISABLED(INTEGRATED_BABYSTEPPING)
2550 2554
       cli();

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

@@ -471,7 +471,7 @@ class Stepper {
471 471
     #endif
472 472
 
473 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 475
     #endif
476 476
 
477 477
     #if HAS_MOTOR_CURRENT_PWM

Loading…
Cancel
Save