Browse Source

babystepping tweak

Scott Lahteine 7 years ago
parent
commit
bbb94b8f68
1 changed files with 4 additions and 7 deletions
  1. 4
    7
      Marlin/temperature.cpp

+ 4
- 7
Marlin/temperature.cpp View File

@@ -2098,13 +2098,10 @@ void Temperature::isr() {
2098 2098
   #if ENABLED(BABYSTEPPING)
2099 2099
     LOOP_XYZ(axis) {
2100 2100
       const int curTodo = babystepsTodo[axis]; // get rid of volatile for performance
2101
-      if (curTodo > 0) {
2102
-        stepper.babystep((AxisEnum)axis, /*fwd*/true);
2103
-        babystepsTodo[axis]--;
2104
-      }
2105
-      else if (curTodo < 0) {
2106
-        stepper.babystep((AxisEnum)axis, /*fwd*/false);
2107
-        babystepsTodo[axis]++;
2101
+      if (curTodo) {
2102
+        stepper.babystep((AxisEnum)axis, curTodo > 0);
2103
+        if (curTodo > 0) babystepsTodo[axis]--;
2104
+                    else babystepsTodo[axis]++;
2108 2105
       }
2109 2106
     }
2110 2107
   #endif // BABYSTEPPING

Loading…
Cancel
Save