feat: 添加声波配网, 需调整application的ReadAudio公有, 需添加条件编译, 位于'afsk_demod.h'内定义参数 (#852)

* feat: 添加声波配网, 需调整application的ReadAudio公有, 需添加条件编译, 位于'afsk_demod.h'内定义参数

* mod: afsk的重构,旨在提高代码可读性并遵循Google C++代码风格指南

* mod: 更新依赖esp-wifi-connect需求版号

* feat: 添加声波配网, 需调整application的ReadAudio公有, 需添加条件编译, 位于'afsk_demod.h'内定义参数

* mod: afsk的重构,旨在提高代码可读性并遵循Google C++代码风格指南

* mod: 更新依赖esp-wifi-connect需求版号

* mod: 添加判断只有在WiFi配置模式下才会调用ReadAudio, 否则delay(联网成功重启后该任务不会被启动)

* add: 添加USE_ACOUSTIC_WIFI_PROVISIONING进MENU开关声波配网功能

---------

Co-authored-by: yangkaiyue <yangkaiyue1@tenclass.com>
This commit is contained in:
Ky1eYang
2025-07-05 14:45:48 +08:00
committed by GitHub
parent f744c9bf3e
commit 10016a3ea5
6 changed files with 600 additions and 2 deletions

View File

@@ -80,6 +80,7 @@ public:
bool CanEnterSleepMode();
void SendMcpMessage(const std::string& payload);
void SetAecMode(AecMode mode);
bool ReadAudio(std::vector<int16_t>& data, int sample_rate, int samples);
AecMode GetAecMode() const { return aec_mode_; }
BackgroundTask* GetBackgroundTask() const { return background_task_; }
@@ -129,7 +130,6 @@ private:
void MainEventLoop();
void OnAudioInput();
void OnAudioOutput();
bool ReadAudio(std::vector<int16_t>& data, int sample_rate, int samples);
void ResetDecoder();
void SetDecodeSampleRate(int sample_rate, int frame_duration);
void CheckNewVersion(Ota& ota);