Add Wi-Fi next-profile rotation control
This commit is contained in:
+6
-3
@@ -27,7 +27,7 @@ static void print_usage(void)
|
||||
{
|
||||
printf("Usage:\n");
|
||||
printf(" wifi status|profiles|counters|clear-counters\n");
|
||||
printf(" wifi start|stop|reconnect\n");
|
||||
printf(" wifi start|stop|reconnect|next-profile\n");
|
||||
printf(" wifi profile set <slot> <priority> <mixed|wpa3> <ssid>\n");
|
||||
printf(" wifi profile secret <slot>\n");
|
||||
printf(" wifi profile enable|disable|delete <slot>\n");
|
||||
@@ -580,8 +580,10 @@ static int queue_lifecycle(const char *operation)
|
||||
error = wifi_manager_start();
|
||||
} else if (strcmp(operation, "stop") == 0) {
|
||||
error = wifi_manager_stop();
|
||||
} else {
|
||||
} else if (strcmp(operation, "reconnect") == 0) {
|
||||
error = wifi_manager_reconnect();
|
||||
} else {
|
||||
error = wifi_manager_next_profile();
|
||||
}
|
||||
if (error != ESP_OK) {
|
||||
printf("Could not queue Wi-Fi %s: %s\n", operation, esp_err_to_name(error));
|
||||
@@ -617,7 +619,8 @@ static int command_wifi(int argc, char **argv)
|
||||
}
|
||||
if (argc == 2 && (strcmp(argv[1], "start") == 0 ||
|
||||
strcmp(argv[1], "stop") == 0 ||
|
||||
strcmp(argv[1], "reconnect") == 0)) {
|
||||
strcmp(argv[1], "reconnect") == 0 ||
|
||||
strcmp(argv[1], "next-profile") == 0)) {
|
||||
return queue_lifecycle(argv[1]);
|
||||
}
|
||||
if (argc == 7 && strcmp(argv[1], "profile") == 0 &&
|
||||
|
||||
Reference in New Issue
Block a user