FIX: 修复双声道声波配网失效, 添加屏幕打印SSID/密码 (#971)

* debug: 添加声波配网的log打印点display

* fix: 修复双声道下声波配网失效的问题

* fix: codec可能为nullptr的问题(需要从单例board获取)

* Update afsk_demod.cc

fix coding style

---------

Co-authored-by: yangkaiyue <yangkaiyue1@tenclass.com>
Co-authored-by: Xiaoxia <terrence@tenclass.com>
This commit is contained in:
Ky1eYang
2025-07-23 22:59:07 +08:00
committed by GitHub
parent ca35b0761b
commit 656bf3c7fa
3 changed files with 72 additions and 104 deletions

View File

@@ -52,7 +52,14 @@ void WifiBoard::EnterWifiConfigMode() {
application.Alert(Lang::Strings::WIFI_CONFIG_MODE, hint.c_str(), "", Lang::Sounds::P3_WIFICONFIG);
#if CONFIG_USE_ACOUSTIC_WIFI_PROVISIONING
audio_wifi_config::ReceiveWifiCredentialsFromAudio(&application, &wifi_ap);
auto display = Board::GetInstance().GetDisplay();
auto codec = Board::GetInstance().GetAudioCodec();
int channel = 1;
if (codec) {
channel = codec->input_channels();
}
ESP_LOGI(TAG, "Start receiving WiFi credentials from audio, input channels: %d", channel);
audio_wifi_config::ReceiveWifiCredentialsFromAudio(&application, &wifi_ap, display, channel);
#endif
// Wait forever until reset after configuration