return to main menu after scene
This commit is contained in:
parent
98080e87dd
commit
285209c7bc
@ -256,6 +256,11 @@ void loop() {
|
|||||||
keypad.loop(ButtonHandler_run);
|
keypad.loop(ButtonHandler_run);
|
||||||
stepper.nextAction();
|
stepper.nextAction();
|
||||||
scenerunner.nextAction();
|
scenerunner.nextAction();
|
||||||
|
if (!scenerunner.isBusy()) {
|
||||||
|
state = STATE_MENU;
|
||||||
|
mainMenu.dirty = true;
|
||||||
|
nav.doOutput();
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -21,6 +21,10 @@ void Scenerunner::start() {
|
|||||||
runStepStart = millis();
|
runStepStart = millis();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool Scenerunner::isBusy() {
|
||||||
|
return runStep == RUN_OFF ? false : true;
|
||||||
|
}
|
||||||
|
|
||||||
void Scenerunner::_runHandler_off() {
|
void Scenerunner::_runHandler_off() {
|
||||||
_lcd->setCursor(0, 1);
|
_lcd->setCursor(0, 1);
|
||||||
_lcd->print("rS: OFF ");
|
_lcd->print("rS: OFF ");
|
||||||
|
@ -21,6 +21,7 @@ class Scenerunner {
|
|||||||
|
|
||||||
Scenerunner(LiquidCrystal *lcd, BasicStepperDriver *stepper, int pin_focus, int pin_shutter, int pin_backlight);
|
Scenerunner(LiquidCrystal *lcd, BasicStepperDriver *stepper, int pin_focus, int pin_shutter, int pin_backlight);
|
||||||
void start();
|
void start();
|
||||||
|
bool isBusy();
|
||||||
void nextAction();
|
void nextAction();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
Loading…
Reference in New Issue
Block a user