Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix compilation errors when HAS_GPS is not defined #635

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 14 additions & 12 deletions esp32_marauder/MenuFunctions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1072,14 +1072,15 @@ void MenuFunctions::updateStatusBar()

uint16_t the_color;

if (this->old_gps_sat_count != gps_obj.getNumSats()) {
this->old_gps_sat_count = gps_obj.getNumSats();
display_obj.tft.fillRect(0, 0, 240, STATUS_BAR_WIDTH, STATUSBAR_COLOR);
status_changed = true;
}

// GPS Stuff
#ifdef HAS_GPS
if (this->old_gps_sat_count != gps_obj.getNumSats()) {
this->old_gps_sat_count = gps_obj.getNumSats();
display_obj.tft.fillRect(0, 0, 240, STATUS_BAR_WIDTH, STATUSBAR_COLOR);
status_changed = true;
}

if (gps_obj.getGpsModuleStatus()) {
if (gps_obj.getFixStatus())
the_color = TFT_GREEN;
Expand Down Expand Up @@ -1509,9 +1510,11 @@ void MenuFunctions::RunSetup()
this->addNodes(&wifiMenu, text_table1[31], TFT_YELLOW, NULL, SNIFFERS, [this]() {
this->changeMenu(&wifiSnifferMenu);
});
#ifdef HAS_GPS
this->addNodes(&wifiMenu, "Wardriving", TFT_GREEN, NULL, BEACON_SNIFF, [this]() {
this->changeMenu(&wardrivingMenu);
});
#endif
this->addNodes(&wifiMenu, text_table1[32], TFT_RED, NULL, ATTACKS, [this]() {
this->changeMenu(&wifiAttackMenu);
});
Expand Down Expand Up @@ -1588,21 +1591,20 @@ void MenuFunctions::RunSetup()
});
#endif

// Build Wardriving menu
wardrivingMenu.parentMenu = &wifiMenu; // Main Menu is second menu parent
this->addNodes(&wardrivingMenu, text09, TFT_LIGHTGREY, NULL, 0, [this]() {
this->changeMenu(wardrivingMenu.parentMenu);
});
#ifdef HAS_GPS
// Build Wardriving menu
wardrivingMenu.parentMenu = &wifiMenu; // Main Menu is second menu parent
this->addNodes(&wardrivingMenu, text09, TFT_LIGHTGREY, NULL, 0, [this]() {
this->changeMenu(wardrivingMenu.parentMenu);
});

if (gps_obj.getGpsModuleStatus()) {
this->addNodes(&wardrivingMenu, "Wardrive", TFT_GREEN, NULL, BEACON_SNIFF, [this]() {
display_obj.clearScreen();
this->drawStatusBar();
wifi_scan_obj.StartScan(WIFI_SCAN_WAR_DRIVE, TFT_GREEN);
});
}
#endif
#ifdef HAS_GPS
if (gps_obj.getGpsModuleStatus()) {
this->addNodes(&wardrivingMenu, "Station Wardrive", TFT_ORANGE, NULL, PROBE_SNIFF, [this]() {
display_obj.clearScreen();
Expand Down
Loading