连接wifi时按下boot重置wifi

This commit is contained in:
Terrence
2024-11-25 02:27:21 +08:00
parent 472219d5bf
commit b07ec1a148
10 changed files with 49 additions and 6 deletions

View File

@@ -7,6 +7,7 @@
#include "led.h"
#include "config.h"
#include <wifi_station.h>
#include <esp_log.h>
#include <driver/i2c_master.h>
@@ -38,7 +39,11 @@ private:
void InitializeButtons() {
boot_button_.OnClick([this]() {
Application::GetInstance().ToggleChatState();
auto& app = Application::GetInstance();
if (app.GetChatState() == kChatStateUnknown && !WifiStation::GetInstance().IsConnected()) {
ResetWifiConfiguration();
}
app.ToggleChatState();
});
volume_up_button_.OnClick([this]() {