mirror of
https://github.com/espressif/esp-idf.git
synced 2026-04-27 19:13:21 +00:00
fix(bt/example): Fixed the HFP printing issue in the CI test
This commit is contained in:
@@ -4,4 +4,10 @@ menu "HFP Example Configuration"
|
||||
default "ESP_HFP_AG"
|
||||
help
|
||||
Use this option to set local device name.
|
||||
|
||||
config EXAMPLE_ENABLE_CONSOLE_REPL
|
||||
bool "Enable UART interactive console (REPL)"
|
||||
default y
|
||||
help
|
||||
Enable UART interactive console (REPL)
|
||||
endmenu
|
||||
|
||||
@@ -22,7 +22,9 @@
|
||||
#include "esp_hf_ag_api.h"
|
||||
#include "bt_app_hf.h"
|
||||
#include "gpio_pcm_config.h"
|
||||
#if CONFIG_EXAMPLE_ENABLE_CONSOLE_REPL
|
||||
#include "esp_console.h"
|
||||
#endif
|
||||
#include "app_hf_msg_set.h"
|
||||
|
||||
#define BT_HF_AG_TAG "HF_AG_DEMO_MAIN"
|
||||
@@ -131,6 +133,7 @@ void app_main(void)
|
||||
app_gpio_aec_io_cfg();
|
||||
#endif /* ACOUSTIC_ECHO_CANCELLATION_ENABLE */
|
||||
|
||||
#if CONFIG_EXAMPLE_ENABLE_CONSOLE_REPL
|
||||
esp_console_repl_t *repl = NULL;
|
||||
esp_console_repl_config_t repl_config = ESP_CONSOLE_REPL_CONFIG_DEFAULT();
|
||||
esp_console_dev_uart_config_t uart_config = ESP_CONSOLE_DEV_UART_CONFIG_DEFAULT();
|
||||
@@ -152,4 +155,5 @@ void app_main(void)
|
||||
|
||||
// start console REPL
|
||||
ESP_ERROR_CHECK(esp_console_start_repl(repl));
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -1,2 +1,3 @@
|
||||
CONFIG_BT_HFP_AUDIO_DATA_PATH_HCI=y
|
||||
CONFIG_EXAMPLE_LOCAL_DEVICE_NAME="${CI_PIPELINE_ID}_HFP"
|
||||
CONFIG_EXAMPLE_ENABLE_CONSOLE_REPL=n
|
||||
|
||||
@@ -9,3 +9,4 @@ CONFIG_BT_CLASSIC_ENABLED=y
|
||||
CONFIG_BT_HFP_ENABLE=y
|
||||
CONFIG_BT_HFP_AG_ENABLE=y
|
||||
CONFIG_BT_HFP_AUDIO_DATA_PATH_HCI=y
|
||||
CONFIG_EXAMPLE_ENABLE_CONSOLE_REPL=n
|
||||
|
||||
@@ -12,4 +12,10 @@ menu "HFP Example Configuration"
|
||||
default "ESP_HFP_AG"
|
||||
help
|
||||
Use this option to set target device name to connect.
|
||||
|
||||
config EXAMPLE_ENABLE_CONSOLE_REPL
|
||||
bool "Enable UART interactive console (REPL)"
|
||||
default y
|
||||
help
|
||||
Enable UART interactive console (REPL)
|
||||
endmenu
|
||||
|
||||
@@ -24,7 +24,9 @@
|
||||
#include "esp_pbac_api.h"
|
||||
#include "bt_app_hf.h"
|
||||
#include "gpio_pcm_config.h"
|
||||
#if CONFIG_EXAMPLE_ENABLE_CONSOLE_REPL
|
||||
#include "esp_console.h"
|
||||
#endif
|
||||
#include "app_hf_msg_set.h"
|
||||
#include "bt_app_pbac.h"
|
||||
|
||||
@@ -216,6 +218,7 @@ void app_main(void)
|
||||
#if ACOUSTIC_ECHO_CANCELLATION_ENABLE
|
||||
app_gpio_aec_io_cfg();
|
||||
#endif /* ACOUSTIC_ECHO_CANCELLATION_ENABLE */
|
||||
#if CONFIG_EXAMPLE_ENABLE_CONSOLE_REPL
|
||||
esp_console_repl_t *repl = NULL;
|
||||
esp_console_repl_config_t repl_config = ESP_CONSOLE_REPL_CONFIG_DEFAULT();
|
||||
esp_console_dev_uart_config_t uart_config = ESP_CONSOLE_DEV_UART_CONFIG_DEFAULT();
|
||||
@@ -237,6 +240,7 @@ void app_main(void)
|
||||
|
||||
// start console REPL
|
||||
ESP_ERROR_CHECK(esp_console_start_repl(repl));
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1,2 +1,3 @@
|
||||
CONFIG_BT_HFP_AUDIO_DATA_PATH_HCI=y
|
||||
CONFIG_EXAMPLE_PEER_DEVICE_NAME="${CI_PIPELINE_ID}_HFP"
|
||||
CONFIG_EXAMPLE_ENABLE_CONSOLE_REPL=n
|
||||
|
||||
@@ -9,3 +9,4 @@ CONFIG_BT_CLASSIC_ENABLED=y
|
||||
CONFIG_BT_HFP_ENABLE=y
|
||||
CONFIG_BT_HFP_CLIENT_ENABLE=y
|
||||
CONFIG_BT_HFP_AUDIO_DATA_PATH_HCI=y
|
||||
CONFIG_EXAMPLE_ENABLE_CONSOLE_REPL=n
|
||||
|
||||
Reference in New Issue
Block a user