fix ambiguous names

This commit is contained in:
Ronald Schaten 2022-02-01 15:32:03 +01:00
parent c066eeb593
commit c0de734b03

View File

@ -57,8 +57,8 @@ LiquidCrystal lcd(PIN_LCD_RS, PIN_LCD_EN, PIN_LCD_DB4, PIN_LCD_DB5, PIN_LCD_DB6,
BasicStepperDriver stepper(STEPPER_STEPS, PIN_STEPPER_DIR, PIN_STEPPER_STEP);
enum State { MENU, JOG, RUN };
State state = MENU;
enum State { STATE_MENU, STATE_JOG, STATE_RUN };
State state = STATE_MENU;
// ===
@ -83,7 +83,7 @@ void ButtonHandler(const ButtonParam& param) {
Serial.print(param.button);
Serial.print(" ");
switch (state) {
case MENU:
case STATE_MENU:
switch (param.state) {
case ButtonState_Click:
Serial.print("Click");
@ -106,7 +106,7 @@ void ButtonHandler(const ButtonParam& param) {
break;
}
break;
case JOG:
case STATE_JOG:
switch (param.state) {
case ButtonState_Up:
Serial.print("Up");
@ -124,7 +124,7 @@ void ButtonHandler(const ButtonParam& param) {
stepper.startRotate(30);
break;
case KEY_SELECT:
state = MENU;
state = STATE_MENU;
nav.doNav(leftCmd);
nav.doOutput();
break;