implemented movement
This commit is contained in:
parent
aa72adad5d
commit
4952e012a6
@ -68,6 +68,7 @@ void Scenerunner::_runHandler_shutter() {
|
|||||||
_lcd->print("Return to start");
|
_lcd->print("Return to start");
|
||||||
runStep = RUN_RETURN;
|
runStep = RUN_RETURN;
|
||||||
runStepStart = millis();
|
runStepStart = millis();
|
||||||
|
_stepper->startMove(- 200/8 * distance * (nSteps - 1));
|
||||||
} else {
|
} else {
|
||||||
step++;
|
step++;
|
||||||
_lcd->clear();
|
_lcd->clear();
|
||||||
@ -75,6 +76,7 @@ void Scenerunner::_runHandler_shutter() {
|
|||||||
_lcd->print(step);
|
_lcd->print(step);
|
||||||
runStep = RUN_MOVE;
|
runStep = RUN_MOVE;
|
||||||
runStepStart = millis();
|
runStepStart = millis();
|
||||||
|
_stepper->startMove(200/8 * distance);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -84,8 +86,7 @@ void Scenerunner::_runHandler_move() {
|
|||||||
_lcd->print("Moving ");
|
_lcd->print("Moving ");
|
||||||
_lcd->print(distance);
|
_lcd->print(distance);
|
||||||
_lcd->print("mm");
|
_lcd->print("mm");
|
||||||
if (millis() >= runStepStart + 1234) {
|
if (_stepper->getStepsRemaining() == 0) {
|
||||||
// dummy wait time
|
|
||||||
_lcd->clear();
|
_lcd->clear();
|
||||||
_lcd->print("Step ");
|
_lcd->print("Step ");
|
||||||
_lcd->print(step);
|
_lcd->print(step);
|
||||||
@ -97,7 +98,7 @@ void Scenerunner::_runHandler_move() {
|
|||||||
void Scenerunner::_runHandler_return() {
|
void Scenerunner::_runHandler_return() {
|
||||||
_lcd->setCursor(0, 1);
|
_lcd->setCursor(0, 1);
|
||||||
_lcd->print("moving ");
|
_lcd->print("moving ");
|
||||||
_lcd->print(distance * nSteps);
|
_lcd->print(distance * (nSteps - 1));
|
||||||
_lcd->print("mm");
|
_lcd->print("mm");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user