get rid of helper function
This commit is contained in:
parent
e574248a7f
commit
431494723d
@ -64,17 +64,6 @@ State state = STATE_MENU;
|
|||||||
|
|
||||||
Scenerunner scenerunner(&lcd);
|
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.
|
// Order of menu entries looks chaotic. It makes sense on screen.
|
||||||
// This is because serial IO (which is used since ArduinoMenu doesn't support
|
// 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() {
|
result enter_jog() {
|
||||||
Serial.println("enter_jog()");
|
Serial.println("enter_jog()");
|
||||||
lcd_print(0, "Jogging...");
|
lcd.clear();
|
||||||
lcd_print(1, "[sel] to exit");
|
lcd.print("Jogging...");
|
||||||
|
lcd.setCursor(0, 1);
|
||||||
|
lcd.print("[sel] to exit");
|
||||||
state = STATE_JOG;
|
state = STATE_JOG;
|
||||||
return proceed;
|
return proceed;
|
||||||
}
|
}
|
||||||
|
|
||||||
result enter_run() {
|
result enter_run() {
|
||||||
Serial.println("enter_run()");
|
Serial.println("enter_run()");
|
||||||
lcd_print(0, "Running...");
|
lcd.clear();
|
||||||
lcd_print(1, "[sel] to exit");
|
lcd.print("Running...");
|
||||||
|
lcd.setCursor(0, 1);
|
||||||
|
lcd.print("[sel] to exit");
|
||||||
digitalWrite(PIN_CAMERA_SHUTTER, HIGH);
|
digitalWrite(PIN_CAMERA_SHUTTER, HIGH);
|
||||||
state = STATE_RUN;
|
state = STATE_RUN;
|
||||||
return proceed;
|
return proceed;
|
||||||
@ -246,8 +239,9 @@ void setup() {
|
|||||||
stepper.setSpeedProfile(stepper.LINEAR_SPEED, STEPPER_ACCEL, STEPPER_DECEL);
|
stepper.setSpeedProfile(stepper.LINEAR_SPEED, STEPPER_ACCEL, STEPPER_DECEL);
|
||||||
|
|
||||||
lcd.begin(16,2);
|
lcd.begin(16,2);
|
||||||
lcd_print(0, "PhotoStepper");
|
lcd.print("PhotoStepper");
|
||||||
lcd_print(1, "schatenseite.de");
|
lcd.setCursor(0, 1);
|
||||||
|
lcd.print("schatenseite.de");
|
||||||
delay(2000);
|
delay(2000);
|
||||||
nav.doOutput();
|
nav.doOutput();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user