add wifi scan for quick action

This commit is contained in:
Peter Poetzi
2022-01-05 02:09:25 +01:00
parent 6b42f5093c
commit a5e41c44a9
3 changed files with 20 additions and 2 deletions

View File

@@ -5,6 +5,7 @@
#include "espnowfunctions.h"
#endif
#include "newsettings.h"
#include "wifi_bobbycar.h"
namespace quickactions {
@@ -45,6 +46,9 @@ void handle_bobby_quickaction(espgui::Button button)
case BobbyQuickActions::OPEN_GARAGE:
open_garage();
break;
case BobbyQuickActions::WIFI_SCAN:
action_wifi_scan();
break;
default:
return;
}
@@ -67,6 +71,15 @@ void open_garage()
#endif
}
void action_wifi_scan()
{
if (const auto result = wifi_scan(); result != ESP_OK)
{
ESP_LOGE("BOBBY", "wifi_scan() failed with %s", esp_err_to_name(result));
return;
}
}
void blink_left()
{
#ifdef FEATURE_LEDSTRIP