Update MenuFunctions.cpp

Fix GPS option showing up on Main Menu when GPS Chip is not available.
This commit is contained in:
H4W9
2025-10-26 11:51:06 -05:00
committed by GitHub
parent b0c8dd5cb4
commit 630687359d

View File

@@ -2094,9 +2094,11 @@ void MenuFunctions::RunSetup()
this->changeMenu(&bluetoothMenu, true);
});
#ifdef HAS_GPS
this->addNodes(&mainMenu, text1_66, TFTRED, NULL, GPS_MENU, [this]() {
this->changeMenu(&gpsMenu, true);
});
if (gps_obj.getGpsModuleStatus()) {
this->addNodes(&mainMenu, text1_66, TFTRED, NULL, GPS_MENU, [this]() {
this->changeMenu(&gpsMenu, true);
});
}
#endif
this->addNodes(&mainMenu, text_table1[9], TFTBLUE, NULL, DEVICE, [this]() {
this->changeMenu(&deviceMenu, true);
@@ -4358,3 +4360,4 @@ void MenuFunctions::displayCurrentMenu(int start_index)
}
#endif