Files
xiaozhi-esp32/main/boards/waveshare-s3-touch-amoled-1.75/board_control.cc
Y1hsiaochunnn b49ad1755d Add board support for Waveshare ESP32-S3-Touch-AMOLED-1.75 (#643)
* Add board support for Waveshare ESP32-S3-Touch-AMOLED-1.75

* Fix component excess strings

* Fix the ui

* Update Kconfig.projbuild

Correction board for USB_DEVICE_AEC requirements
2025-05-20 20:59:09 +08:00

33 lines
936 B
C++

#include <freertos/FreeRTOS.h>
#include <freertos/timers.h>
#include <freertos/task.h>
#include <esp_log.h>
#include "board.h"
#include "boards/common/wifi_board.h"
#include "boards/waveshare-s3-touch-amoled-1.75/config.h"
#include "iot/thing.h"
#define TAG "BoardControl"
namespace iot {
class BoardControl : public Thing {
public:
BoardControl() : Thing("BoardControl", "当前 AI 机器人管理和控制") {
// 修改重新配网
methods_.AddMethod("ResetWifiConfiguration", "重新配网", ParameterList(),
[this](const ParameterList& parameters) {
ESP_LOGI(TAG, "ResetWifiConfiguration");
auto board = static_cast<WifiBoard*>(&Board::GetInstance());
if (board && board->GetBoardType() == "wifi") {
board->ResetWifiConfiguration();
}
});
}
};
} // namespace iot
DECLARE_THING(BoardControl);