Bläddra i källkod

Apply const in BABYSTEPPING

Scott Lahteine 7 år sedan
förälder
incheckning
11104f177b
1 ändrade filer med 5 tillägg och 6 borttagningar
  1. 5
    6
      Marlin/temperature.cpp

+ 5
- 6
Marlin/temperature.cpp Visa fil

@@ -2045,15 +2045,14 @@ void Temperature::isr() {
2045 2045
 
2046 2046
   #if ENABLED(BABYSTEPPING)
2047 2047
     LOOP_XYZ(axis) {
2048
-      int curTodo = babystepsTodo[axis]; //get rid of volatile for performance
2049
-
2048
+      const int curTodo = babystepsTodo[axis]; // get rid of volatile for performance
2050 2049
       if (curTodo > 0) {
2051
-        stepper.babystep((AxisEnum)axis,/*fwd*/true);
2052
-        babystepsTodo[axis]--; //fewer to do next time
2050
+        stepper.babystep((AxisEnum)axis, /*fwd*/true);
2051
+        babystepsTodo[axis]--;
2053 2052
       }
2054 2053
       else if (curTodo < 0) {
2055
-        stepper.babystep((AxisEnum)axis,/*fwd*/false);
2056
-        babystepsTodo[axis]++; //fewer to do next time
2054
+        stepper.babystep((AxisEnum)axis, /*fwd*/false);
2055
+        babystepsTodo[axis]++;
2057 2056
       }
2058 2057
     }
2059 2058
   #endif // BABYSTEPPING

Laddar…
Avbryt
Spara