Browse Source

Added

master
Englebert 3 years ago
parent
commit
3afaf62797
  1. 6
      src/Screen.cpp
  2. 4
      src/Screen.h

6
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;
}

4
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 {

Loading…
Cancel
Save