diff --git a/PhotoStepper/PhotoStepper.ino b/PhotoStepper/PhotoStepper.ino index 69f329f..1c3e595 100644 --- a/PhotoStepper/PhotoStepper.ino +++ b/PhotoStepper/PhotoStepper.ino @@ -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; } } diff --git a/PhotoStepper/Scenerunner.cpp b/PhotoStepper/Scenerunner.cpp index 183a436..492d51d 100644 --- a/PhotoStepper/Scenerunner.cpp +++ b/PhotoStepper/Scenerunner.cpp @@ -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 "); diff --git a/PhotoStepper/Scenerunner.h b/PhotoStepper/Scenerunner.h index 577ea95..0b9cf09 100644 --- a/PhotoStepper/Scenerunner.h +++ b/PhotoStepper/Scenerunner.h @@ -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: