Browse Source

Minor babystep cleanup patches

Scott Lahteine 7 years ago
parent
commit
00662b8635
5 changed files with 7 additions and 7 deletions
  1. 1
    1
      Marlin/stepper.cpp
  2. 1
    1
      Marlin/stepper.h
  3. 3
    3
      Marlin/temperature.cpp
  4. 1
    1
      Marlin/temperature.h
  5. 1
    1
      Marlin/ultralcd.cpp

+ 1
- 1
Marlin/stepper.cpp View File

@@ -1125,7 +1125,7 @@ void Stepper::report_positions() {
1125 1125
 
1126 1126
   // MUST ONLY BE CALLED BY AN ISR,
1127 1127
   // No other ISR should ever interrupt this!
1128
-  void Stepper::babystep(const uint8_t axis, const bool direction) {
1128
+  void Stepper::babystep(const AxisEnum axis, const bool direction) {
1129 1129
 
1130 1130
     switch (axis) {
1131 1131
 

+ 1
- 1
Marlin/stepper.h View File

@@ -257,7 +257,7 @@ class Stepper {
257 257
     #endif
258 258
 
259 259
     #if ENABLED(BABYSTEPPING)
260
-      static void babystep(const uint8_t axis, const bool direction); // perform a short step with a single stepper motor, outside of any convention
260
+      static void babystep(const AxisEnum axis, const bool direction); // perform a short step with a single stepper motor, outside of any convention
261 261
     #endif
262 262
 
263 263
     static inline void kill_current_block() {

+ 3
- 3
Marlin/temperature.cpp View File

@@ -1916,15 +1916,15 @@ void Temperature::isr() {
1916 1916
   } // temp_count >= OVERSAMPLENR
1917 1917
 
1918 1918
   #if ENABLED(BABYSTEPPING)
1919
-    for (uint8_t axis = X_AXIS; axis <= Z_AXIS; axis++) {
1919
+    LOOP_XYZ(axis) {
1920 1920
       int curTodo = babystepsTodo[axis]; //get rid of volatile for performance
1921 1921
 
1922 1922
       if (curTodo > 0) {
1923
-        stepper.babystep(axis,/*fwd*/true);
1923
+        stepper.babystep((AxisEnum)axis,/*fwd*/true);
1924 1924
         babystepsTodo[axis]--; //fewer to do next time
1925 1925
       }
1926 1926
       else if (curTodo < 0) {
1927
-        stepper.babystep(axis,/*fwd*/false);
1927
+        stepper.babystep((AxisEnum)axis,/*fwd*/false);
1928 1928
         babystepsTodo[axis]++; //fewer to do next time
1929 1929
       }
1930 1930
     }

+ 1
- 1
Marlin/temperature.h View File

@@ -384,7 +384,7 @@ class Temperature {
384 384
 
385 385
     #if ENABLED(BABYSTEPPING)
386 386
 
387
-      static void babystep_axis(AxisEnum axis, int distance) {
387
+      static void babystep_axis(const AxisEnum axis, const int distance) {
388 388
         #if ENABLED(COREXY) || ENABLED(COREXZ) || ENABLED(COREYZ)
389 389
           #if ENABLED(BABYSTEP_XY)
390 390
             switch (axis) {

+ 1
- 1
Marlin/ultralcd.cpp View File

@@ -651,7 +651,7 @@ void kill_screen(const char* lcd_msg) {
651 651
       if (lcd_clicked) { defer_return_to_status = false; return lcd_goto_previous_menu(); }
652 652
       ENCODER_DIRECTION_NORMAL();
653 653
       if (encoderPosition) {
654
-        int babystep_increment = (int32_t)encoderPosition * BABYSTEP_MULTIPLICATOR;
654
+        int babystep_increment = (int32_t)encoderPosition * (BABYSTEP_MULTIPLICATOR);
655 655
         encoderPosition = 0;
656 656
         lcdDrawUpdate = LCDVIEW_REDRAW_NOW;
657 657
         thermalManager.babystep_axis(axis, babystep_increment);

Loading…
Cancel
Save