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,7 +6,6 @@
|
||||
#include "config.h"
|
||||
#include "power_save_timer.h"
|
||||
#include "i2c_device.h"
|
||||
#include "iot/thing_manager.h"
|
||||
#include "sy6970.h"
|
||||
#include "pin_config.h"
|
||||
#include "esp32_camera.h"
|
||||
@@ -277,6 +276,10 @@ private:
|
||||
camera_->SetHMirror(1);
|
||||
}
|
||||
|
||||
void InitializeTools() {
|
||||
static IrFilterController irFilter(AP1511B_GPIO);
|
||||
}
|
||||
|
||||
public:
|
||||
LilygoTCameraPlusS3Board() : boot_button_(BOOT_BUTTON_GPIO), key1_button_(KEY1_BUTTON_GPIO) {
|
||||
InitializePowerSaveTimer();
|
||||
@@ -288,14 +291,7 @@ public:
|
||||
InitializeSt7789Display();
|
||||
InitializeButtons();
|
||||
InitializeCamera();
|
||||
#if CONFIG_IOT_PROTOCOL_XIAOZHI
|
||||
auto &thing_manager = iot::ThingManager::GetInstance();
|
||||
thing_manager.AddThing(iot::CreateThing("Speaker"));
|
||||
thing_manager.AddThing(iot::CreateThing("Screen"));
|
||||
thing_manager.AddThing(iot::CreateThing("Battery"));
|
||||
#elif CONFIG_IOT_PROTOCOL_MCP
|
||||
static IrFilterController irFilter(AP1511B_GPIO);
|
||||
#endif
|
||||
InitializeTools();
|
||||
GetBacklight()->RestoreBrightness();
|
||||
}
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#ifndef _TCIRCLES3_AUDIO_CODEC_H
|
||||
#define _TCIRCLES3_AUDIO_CODEC_H
|
||||
|
||||
#include "audio_codecs/audio_codec.h"
|
||||
#include "audio_codec.h"
|
||||
|
||||
#include <esp_codec_dev.h>
|
||||
#include <esp_codec_dev_defaults.h>
|
||||
|
||||
Reference in New Issue
Block a user