forked from xiaozhi/xiaozhi-esp32
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
This commit is contained in:
32
main/boards/waveshare-s3-touch-amoled-1.75/board_control.cc
Normal file
32
main/boards/waveshare-s3-touch-amoled-1.75/board_control.cc
Normal file
@@ -0,0 +1,32 @@
|
||||
#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);
|
||||
Reference in New Issue
Block a user