implemented movement

This commit is contained in:
Ronald Schaten 2022-02-11 22:35:26 +01:00
parent aa72adad5d
commit 4952e012a6

View File

@ -68,6 +68,7 @@ void Scenerunner::_runHandler_shutter() {
_lcd->print("Return to start");
runStep = RUN_RETURN;
runStepStart = millis();
_stepper->startMove(- 200/8 * distance * (nSteps - 1));
} else {
step++;
_lcd->clear();
@ -75,6 +76,7 @@ void Scenerunner::_runHandler_shutter() {
_lcd->print(step);
runStep = RUN_MOVE;
runStepStart = millis();
_stepper->startMove(200/8 * distance);
}
}
}
@ -84,8 +86,7 @@ void Scenerunner::_runHandler_move() {
_lcd->print("Moving ");
_lcd->print(distance);
_lcd->print("mm");
if (millis() >= runStepStart + 1234) {
// dummy wait time
if (_stepper->getStepsRemaining() == 0) {
_lcd->clear();
_lcd->print("Step ");
_lcd->print(step);
@ -97,7 +98,7 @@ void Scenerunner::_runHandler_move() {
void Scenerunner::_runHandler_return() {
_lcd->setCursor(0, 1);
_lcd->print("moving ");
_lcd->print(distance * nSteps);
_lcd->print(distance * (nSteps - 1));
_lcd->print("mm");
}