refactor, move debug code

This commit is contained in:
Ronald Schaten 2022-02-10 15:27:39 +01:00
parent 97398cffd7
commit 886f72f03a
2 changed files with 9 additions and 8 deletions

View File

@ -81,11 +81,6 @@ result enter_jog() {
result enter_run() {
Serial.println("enter_run()");
lcd.clear();
lcd.print("Running...");
lcd.setCursor(0, 1);
lcd.print("[sel] to exit");
digitalWrite(PIN_CAMERA_SHUTTER, HIGH);
state = STATE_RUN;
return proceed;
}
@ -212,12 +207,13 @@ void ButtonHandler_run(const ButtonParam& param) {
switch (param.state) {
default:
Serial.println();
stepper.stop();
stepper.setRPM(STEPPER_RPM);
state = STATE_MENU;
mainMenu.dirty = true;
nav.doOutput();
break;
}
digitalWrite(PIN_CAMERA_SHUTTER, LOW);
}
void setup() {
@ -253,11 +249,12 @@ void loop() {
break;
case STATE_JOG:
keypad.loop(ButtonHandler_jog);
stepper.nextAction();
break;
case STATE_RUN:
keypad.loop(ButtonHandler_run);
stepper.nextAction();
scenerunner.nextAction();
break;
}
stepper.nextAction();
scenerunner.nextAction();
}

View File

@ -13,4 +13,8 @@ Scenerunner::Scenerunner(LiquidCrystal *lcd, BasicStepperDriver *stepper, int pi
void Scenerunner::nextAction(){
// TODO: implement actions
_lcd->clear();
_lcd->print("Running...");
_lcd->setCursor(0, 1);
_lcd->print("[sel] to exit");
}