Added invert function to loop

This commit is contained in:
mrcory
2020-02-14 11:53:28 -05:00
parent de6bbb663a
commit 37e3b3787a
2 changed files with 3 additions and 1 deletions
+2
View File
@@ -201,5 +201,7 @@ void checkInvert() {
shade[i] = shade[i]*-1;
}
invertMotor[1] = invertMotor[0]; //Set change flag
configSave();
Serial.println("Direction Inverted");
}
}
+1 -1
View File
@@ -233,6 +233,7 @@ void loop() {
oldBrightness = ledBrightness;
currentDistance = stepper.distanceToGo();
checkInvert();
if (ledFeedback == true) {
ledFeedbackf();
@@ -249,7 +250,6 @@ void loop() {
//If not moving, run extra features
if (stepper.distanceToGo() == 0) {
blynkRun(); //Only run blynk when the stepper is not active
if (setHome == true) {
resetHold(); //Set current position as home