Merge branch 'H4W9_GPSMenu_FunnySpam' into Funny-Beacon-Spam

This commit is contained in:
H4W9
2025-08-21 11:33:45 -05:00
committed by GitHub
4 changed files with 31 additions and 12 deletions

View File

@@ -1902,6 +1902,7 @@ void MenuFunctions::RunSetup()
deviceMenu.list = new LinkedList<MenuNode>();
#ifdef HAS_GPS
if (gps_obj.getGpsModuleStatus()) {
gpsMenu.list = new LinkedList<MenuNode>(); // H4W9 Added GPS Menu
gpsInfoMenu.list = new LinkedList<MenuNode>();
}
#endif
@@ -2014,6 +2015,7 @@ void MenuFunctions::RunSetup()
//#endif
#ifdef HAS_GPS
gpsInfoMenu.name = "GPS Data";
gpsMenu.name = "GPS"; // H4W9 Added GPS Menu
wardrivingMenu.name = "Wardriving";
#endif
htmlMenu.name = "EP HTML List";
@@ -2039,6 +2041,14 @@ void MenuFunctions::RunSetup()
this->addNodes(&mainMenu, text_table1[19], TFTCYAN, NULL, BLUETOOTH, [this]() {
this->changeMenu(&bluetoothMenu);
});
// H4W9 Added GPS Menu option to Main Menu
#ifdef HAS_GPS
this->addNodes(&mainMenu, text1_66, TFTRED, NULL, GPS_MENU, [this]() {
this->changeMenu(&gpsMenu);
});
#endif
this->addNodes(&mainMenu, text_table1[9], TFTBLUE, NULL, DEVICE, [this]() {
this->changeMenu(&deviceMenu);
});
@@ -3320,35 +3330,43 @@ void MenuFunctions::RunSetup()
this->changeMenu(loadATsMenu.parentMenu);
});
// GPS Menu
// H4W9 Moved GPS functions to GPS Menu
// Build GPS Menu
#ifdef HAS_GPS
if (gps_obj.getGpsModuleStatus()) {
this->addNodes(&deviceMenu, "GPS Data", TFTRED, NULL, GPS_MENU, [this]() {
gpsMenu.parentMenu = &mainMenu; // Main Menu is second menu parent
this->addNodes(&gpsMenu, text09, TFTLIGHTGREY, NULL, 0, [this]() {
this->changeMenu(gpsMenu.parentMenu);
});
this->addNodes(&gpsMenu, "GPS Data", TFTRED, NULL, GPS_MENU, [this]() {
wifi_scan_obj.currentScanMode = WIFI_SCAN_GPS_DATA;
this->changeMenu(&gpsInfoMenu);
wifi_scan_obj.StartScan(WIFI_SCAN_GPS_DATA, TFT_CYAN);
});
this->addNodes(&deviceMenu, "NMEA Stream", TFTORANGE, NULL, GPS_MENU, [this]() {
this->addNodes(&gpsMenu, "NMEA Stream", TFTORANGE, NULL, GPS_MENU, [this]() {
wifi_scan_obj.currentScanMode = WIFI_SCAN_GPS_NMEA;
this->changeMenu(&gpsInfoMenu);
wifi_scan_obj.StartScan(WIFI_SCAN_GPS_NMEA, TFT_ORANGE);
});
this->addNodes(&deviceMenu, "GPS Tracker", TFTGREEN, NULL, GPS_MENU, [this]() {
this->addNodes(&gpsMenu, "GPS Tracker", TFTGREEN, NULL, GPS_MENU, [this]() {
wifi_scan_obj.currentScanMode = GPS_TRACKER;
this->changeMenu(&gpsInfoMenu);
wifi_scan_obj.StartScan(GPS_TRACKER, TFT_CYAN);
});
this->addNodes(&deviceMenu, "GPS POI", TFTCYAN, NULL, GPS_MENU, [this]() {
this->addNodes(&gpsMenu, "GPS POI", TFTCYAN, NULL, GPS_MENU, [this]() {
wifi_scan_obj.StartScan(GPS_POI, TFT_CYAN);
wifi_scan_obj.currentScanMode = WIFI_SCAN_OFF;
this->changeMenu(&gpsPOIMenu);
});
// GPS POI Menu
gpsPOIMenu.parentMenu = &deviceMenu;
gpsPOIMenu.parentMenu = &gpsMenu;
this->addNodes(&gpsPOIMenu, text09, TFTLIGHTGREY, NULL, 0, [this]() {
wifi_scan_obj.currentScanMode = GPS_POI;
wifi_scan_obj.StartScan(WIFI_SCAN_OFF);
@@ -3373,7 +3391,7 @@ void MenuFunctions::RunSetup()
});
// GPS Info Menu
gpsInfoMenu.parentMenu = &deviceMenu;
gpsInfoMenu.parentMenu = &gpsMenu;
this->addNodes(&gpsInfoMenu, text09, TFTLIGHTGREY, NULL, 0, [this]() {
if(wifi_scan_obj.currentScanMode != GPS_TRACKER)
wifi_scan_obj.currentScanMode = WIFI_SCAN_OFF;
@@ -4155,6 +4173,3 @@ void MenuFunctions::displayCurrentMenu(int start_index)
}
#endif