Just Call Me Koko 3 лет назад
Родитель
Сommit
5341c559be
1 измененных файлов с 15 добавлено и 1 удалено
  1. 15 1
      esp32_marauder/CommandLine.cpp

+ 15 - 1
esp32_marauder/CommandLine.cpp

@@ -23,10 +23,24 @@ void CommandLine::main(uint32_t currentTime) {
 void CommandLine::parseCommand(String input) {
 void CommandLine::parseCommand(String input) {
   if (input != "")
   if (input != "")
     Serial.println("#" + input);
     Serial.println("#" + input);
+
+  if (input == "stopscan") {
+    wifi_scan_obj.StartScan(WIFI_SCAN_OFF);
+
+    // If we don't do this, the text and button coordinates will be off
+    display_obj.tft.init();
+
+    // Take us back to the menu
+    menu_function_obj.changeMenu(menu_function_obj.current_menu);
+  }
     
     
-  if (input == "scanap") {
+  else if (input == "scanap") {
     display_obj.clearScreen();
     display_obj.clearScreen();
     menu_function_obj.drawStatusBar();
     menu_function_obj.drawStatusBar();
     wifi_scan_obj.StartScan(WIFI_SCAN_TARGET_AP, TFT_MAGENTA);
     wifi_scan_obj.StartScan(WIFI_SCAN_TARGET_AP, TFT_MAGENTA);
   }
   }
+
+  else if (input == "clearap") {
+    wifi_scan_obj.RunClearAPs();
+  }
 }
 }