get rid of helper function

This commit is contained in:
Ronald Schaten 2022-02-10 15:02:22 +01:00
parent e574248a7f
commit 431494723d

View File

@ -64,17 +64,6 @@ State state = STATE_MENU;
Scenerunner scenerunner(&lcd);
void lcd_print(int line, String string) {
Serial.print("lcd_print(");
Serial.print(line);
Serial.print(", \"");
Serial.print(string);
Serial.println("\")");
lcd.setCursor(0, line);
lcd.print(string);
for (int i = string.length(); i<16; i++) lcd.print(' ');
}
// ===
// Order of menu entries looks chaotic. It makes sense on screen.
// This is because serial IO (which is used since ArduinoMenu doesn't support
@ -82,16 +71,20 @@ void lcd_print(int line, String string) {
result enter_jog() {
Serial.println("enter_jog()");
lcd_print(0, "Jogging...");
lcd_print(1, "[sel] to exit");
lcd.clear();
lcd.print("Jogging...");
lcd.setCursor(0, 1);
lcd.print("[sel] to exit");
state = STATE_JOG;
return proceed;
}
result enter_run() {
Serial.println("enter_run()");
lcd_print(0, "Running...");
lcd_print(1, "[sel] to exit");
lcd.clear();
lcd.print("Running...");
lcd.setCursor(0, 1);
lcd.print("[sel] to exit");
digitalWrite(PIN_CAMERA_SHUTTER, HIGH);
state = STATE_RUN;
return proceed;
@ -246,8 +239,9 @@ void setup() {
stepper.setSpeedProfile(stepper.LINEAR_SPEED, STEPPER_ACCEL, STEPPER_DECEL);
lcd.begin(16,2);
lcd_print(0, "PhotoStepper");
lcd_print(1, "schatenseite.de");
lcd.print("PhotoStepper");
lcd.setCursor(0, 1);
lcd.print("schatenseite.de");
delay(2000);
nav.doOutput();
}