return to main menu after scene

This commit is contained in:
Ronald Schaten 2022-02-11 23:10:38 +01:00
parent 98080e87dd
commit 285209c7bc
3 changed files with 10 additions and 0 deletions

View File

@ -256,6 +256,11 @@ void loop() {
keypad.loop(ButtonHandler_run);
stepper.nextAction();
scenerunner.nextAction();
if (!scenerunner.isBusy()) {
state = STATE_MENU;
mainMenu.dirty = true;
nav.doOutput();
}
break;
}
}

View File

@ -21,6 +21,10 @@ void Scenerunner::start() {
runStepStart = millis();
}
bool Scenerunner::isBusy() {
return runStep == RUN_OFF ? false : true;
}
void Scenerunner::_runHandler_off() {
_lcd->setCursor(0, 1);
_lcd->print("rS: OFF ");

View File

@ -21,6 +21,7 @@ class Scenerunner {
Scenerunner(LiquidCrystal *lcd, BasicStepperDriver *stepper, int pin_focus, int pin_shutter, int pin_backlight);
void start();
bool isBusy();
void nextAction();
private: