forked from xiaozhi/xiaozhi-esp32
v1.8.0: Audio 代码重构与低功耗优化 (#943)
* Reconstruct Audio Code * Remove old IoT implementation * Add MQTT-UDP documentation * OTA升级失败时,可以继续使用
This commit is contained in:
@@ -6,8 +6,7 @@
|
||||
"sdkconfig_append": [
|
||||
"CONFIG_ESP_PHY_MAX_WIFI_TX_POWER=10",
|
||||
"CONFIG_ESP_PHY_MAX_TX_POWER=10",
|
||||
"CONFIG_SPIRAM_MODE_OCT=y",
|
||||
"CONFIG_IOT_PROTOCOL_MCP=y"
|
||||
"CONFIG_SPIRAM_MODE_OCT=y"
|
||||
]
|
||||
}
|
||||
]
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
#include "wifi_board.h"
|
||||
#include "audio_codecs/no_audio_codec.h"
|
||||
#include "codecs/no_audio_codec.h"
|
||||
#include "system_reset.h"
|
||||
#include "application.h"
|
||||
#include "button.h"
|
||||
#include "config.h"
|
||||
#include "iot/thing_manager.h"
|
||||
#include "esp32_camera.h"
|
||||
|
||||
#include "led/gpio_led.h"
|
||||
@@ -30,12 +29,6 @@ class DfrobotEsp32S3AiCam : public WifiBoard {
|
||||
});
|
||||
}
|
||||
|
||||
// 物联网初始化,添加对 AI 可见设备
|
||||
void InitializeIot() {
|
||||
auto& thing_manager = iot::ThingManager::GetInstance();
|
||||
thing_manager.AddThing(iot::CreateThing("Speaker"));
|
||||
}
|
||||
|
||||
void InitializeCamera() {
|
||||
camera_config_t config = {};
|
||||
config.ledc_channel = LEDC_CHANNEL_2; // LEDC通道选择 用于生成XCLK时钟 但是S3不用
|
||||
@@ -73,13 +66,7 @@ class DfrobotEsp32S3AiCam : public WifiBoard {
|
||||
DfrobotEsp32S3AiCam() :
|
||||
boot_button_(BOOT_BUTTON_GPIO) {
|
||||
InitializeButtons();
|
||||
InitializeIot();
|
||||
InitializeCamera();
|
||||
|
||||
#if CONFIG_IOT_PROTOCOL_XIAOZHI
|
||||
auto& thing_manager = iot::ThingManager::GetInstance();
|
||||
thing_manager.AddThing(iot::CreateThing("Speaker"));
|
||||
#endif
|
||||
}
|
||||
|
||||
virtual Led* GetLed() override {
|
||||
|
||||
Reference in New Issue
Block a user