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

Refactor Bluetooth Wardrive command in CommandLine.cpp #581

Open
wants to merge 2 commits 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
27 changes: 9 additions & 18 deletions esp32_marauder/CommandLine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -982,43 +982,34 @@ void CommandLine::runCommand(String input) {
int cont_sw = this->argSearch(&cmd_args, "-c");

if (cont_sw == -1) {
Serial.println("Starting BT Wardrive. Stop with " + (String)STOPSCAN_CMD);
Serial.println("Starting BT Wardrive. Stop with button press.");
#ifdef HAS_SCREEN
display_obj.clearScreen();
menu_function_obj.drawStatusBar();
#endif
wifi_scan_obj.StartScan(BT_SCAN_WAR_DRIVE, TFT_GREEN);
}
else {Serial.println("Starting Continuous BT Wardrive. Stop with " + (String)STOPSCAN_CMD);
else {
Serial.println("Starting Continuous BT Wardrive. Stop with button press.");
#ifdef HAS_SCREEN
display_obj.clearScreen();
menu_function_obj.drawStatusBar();
#endif
wifi_scan_obj.StartScan(BT_SCAN_WAR_DRIVE_CONT, TFT_GREEN);

if (wifi_scan_obj.StartScan(BT_SCAN_WAR_DRIVE_CONT, TFT_GREEN)) {
isContinuousWardriveActive = true;
}
}
}
else
else {
Serial.println("GPS Module not detected");
}
#else
Serial.println("GPS not supported");
#endif
#else
Serial.println("Bluetooth not supported");
#endif

}
// Bluetooth CC Skimmer scan
else if (cmd_args.get(0) == BT_SKIM_CMD) {
#ifdef HAS_BT
Serial.println("Starting Bluetooth CC Skimmer scan. Stop with " + (String)STOPSCAN_CMD);
#ifdef HAS_SCREEN
display_obj.clearScreen();
menu_function_obj.drawStatusBar();
#endif
wifi_scan_obj.StartScan(BT_SCAN_SKIMMERS, TFT_MAGENTA);
#else
Serial.println("Bluetooth not supported");
#endif
}

// Update command
Expand Down
Loading