From bbb94b8f68d296f7ec9cb55fcc8d2c619640e946 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Tue, 26 Sep 2017 23:13:24 -0500 Subject: [PATCH] babystepping tweak --- Marlin/temperature.cpp | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/Marlin/temperature.cpp b/Marlin/temperature.cpp index 261e12cff..e2ea53784 100644 --- a/Marlin/temperature.cpp +++ b/Marlin/temperature.cpp @@ -2098,13 +2098,10 @@ void Temperature::isr() { #if ENABLED(BABYSTEPPING) LOOP_XYZ(axis) { const int curTodo = babystepsTodo[axis]; // get rid of volatile for performance - if (curTodo > 0) { - stepper.babystep((AxisEnum)axis, /*fwd*/true); - babystepsTodo[axis]--; - } - else if (curTodo < 0) { - stepper.babystep((AxisEnum)axis, /*fwd*/false); - babystepsTodo[axis]++; + if (curTodo) { + stepper.babystep((AxisEnum)axis, curTodo > 0); + if (curTodo > 0) babystepsTodo[axis]--; + else babystepsTodo[axis]++; } } #endif // BABYSTEPPING