Merge pull request #6658 from thinkyhead/bf_cleanup_tuesday

Patch spacing, const, .gitignore
This commit is contained in:
Scott Lahteine 2017-05-09 16:22:48 -05:00 committed by GitHub
commit 59ab971f81
31 changed files with 75 additions and 78 deletions

4
.gitignore vendored
View file

@ -116,9 +116,7 @@ tags
*.su *.su
# PlatformIO files/dirs # PlatformIO files/dirs
.pioenvs .pio*
.piolib
.piolibdeps
lib/readme.txt lib/readme.txt
#Visual Studio #Visual Studio

View file

@ -2045,15 +2045,14 @@ void Temperature::isr() {
#if ENABLED(BABYSTEPPING) #if ENABLED(BABYSTEPPING)
LOOP_XYZ(axis) { LOOP_XYZ(axis) {
int curTodo = babystepsTodo[axis]; //get rid of volatile for performance const int curTodo = babystepsTodo[axis]; // get rid of volatile for performance
if (curTodo > 0) { if (curTodo > 0) {
stepper.babystep((AxisEnum)axis, /*fwd*/true); stepper.babystep((AxisEnum)axis, /*fwd*/true);
babystepsTodo[axis]--; //fewer to do next time babystepsTodo[axis]--;
} }
else if (curTodo < 0) { else if (curTodo < 0) {
stepper.babystep((AxisEnum)axis, /*fwd*/false); stepper.babystep((AxisEnum)axis, /*fwd*/false);
babystepsTodo[axis]++; //fewer to do next time babystepsTodo[axis]++;
} }
} }
#endif // BABYSTEPPING #endif // BABYSTEPPING