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); BasicStepperDriver stepper(STEPPER_STEPS, PIN_STEPPER_DIR, PIN_STEPPER_STEP);
enum State { MENU, JOG, RUN }; enum State { STATE_MENU, STATE_JOG, STATE_RUN };
State state = MENU; State state = STATE_MENU;
// === // ===
@ -83,7 +83,7 @@ void ButtonHandler(const ButtonParam& param) {
Serial.print(param.button); Serial.print(param.button);
Serial.print(" "); Serial.print(" ");
switch (state) { switch (state) {
case MENU: case STATE_MENU:
switch (param.state) { switch (param.state) {
case ButtonState_Click: case ButtonState_Click:
Serial.print("Click"); Serial.print("Click");
@ -106,7 +106,7 @@ void ButtonHandler(const ButtonParam& param) {
break; break;
} }
break; break;
case JOG: case STATE_JOG:
switch (param.state) { switch (param.state) {
case ButtonState_Up: case ButtonState_Up:
Serial.print("Up"); Serial.print("Up");
@ -124,7 +124,7 @@ void ButtonHandler(const ButtonParam& param) {
stepper.startRotate(30); stepper.startRotate(30);
break; break;
case KEY_SELECT: case KEY_SELECT:
state = MENU; state = STATE_MENU;
nav.doNav(leftCmd); nav.doNav(leftCmd);
nav.doOutput(); nav.doOutput();
break; break;