diff --git a/src/Screen.cpp b/src/Screen.cpp index 7e44a93..641d857 100644 --- a/src/Screen.cpp +++ b/src/Screen.cpp @@ -43,6 +43,8 @@ void Screen::update(void) { blegamepad.show(&mainscreen_buffer); } else if(current_screen == SCREEN_MENU_STICK_CALIBRATION) { stickcalibration.mydebug(&mainscreen_buffer); + } else if(current_screen == SCREEN_MENU_STICK_POSITIONS) { + stickpositions.main(&mainscreen_buffer); } last_screen_update = millis(); @@ -157,7 +159,7 @@ void Screen::menu(void) { } if(M5.BtnA.wasPressed()) { - current_menu--; + current_menu--; if(current_menu == 255) current_menu = 0; @@ -181,6 +183,8 @@ void Screen::menu(void) { } else if(current_menu == MENU_STICK_CALIBRATION) { current_screen = SCREEN_MENU_STICK_CALIBRATION; stickcalibration.updated = true; + } else if(current_menu == MENU_STICK_POSITIONS) { + current_screen = SCREEN_MENU_STICK_POSITIONS; } updated = true; } diff --git a/src/Screen.h b/src/Screen.h index 4c4d6b5..3919097 100644 --- a/src/Screen.h +++ b/src/Screen.h @@ -6,6 +6,7 @@ #include "BLEGamepad.h" #include "Speak.h" #include "StickCalibration.h" +#include "StickPositions.h" #define REFRESH_TIME 1 #define INTRO_TIME 100 @@ -22,7 +23,8 @@ enum screen_names { SCREEN_MENU_REBOOT, SCREEN_MENU_POWEROFF, SCREEN_MENU_BLUETOOTH, - SCREEN_MENU_STICK_CALIBRATION + SCREEN_MENU_STICK_CALIBRATION, + SCREEN_MENU_STICK_POSITIONS }; enum menu_items {