From b2e67d6ff19fa5466e82546b4bba149fb248bc77 Mon Sep 17 00:00:00 2001 From: Yuan Hong Hui Date: Mon, 7 Mar 2022 11:03:54 +0800 Subject: [PATCH] ble mesh:example:correct repl config prompt in ble mesh console(v4.4) --- .../ble_mesh_console/main/ble_mesh_console_main.c | 14 +++++++++----- .../ble_mesh_console/main/ble_mesh_register_cmd.c | 2 +- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/examples/bluetooth/esp_ble_mesh/ble_mesh_console/main/ble_mesh_console_main.c b/examples/bluetooth/esp_ble_mesh/ble_mesh_console/main/ble_mesh_console_main.c index f6b0889a6e..229ebd1ff2 100644 --- a/examples/bluetooth/esp_ble_mesh/ble_mesh_console/main/ble_mesh_console_main.c +++ b/examples/bluetooth/esp_ble_mesh/ble_mesh_console/main/ble_mesh_console_main.c @@ -19,16 +19,11 @@ #include "esp_vfs_dev.h" #include "nvs.h" #include "nvs_flash.h" - #include "esp_vfs_fat.h" - #include "esp_console.h" - #include "ble_mesh_console_decl.h" #include "ble_mesh_example_init.h" -#define TAG "ble_mesh_test" - #if CONFIG_STORE_HISTORY #define MOUNT_PATH "/data" @@ -70,7 +65,16 @@ void app_main(void) initialize_filesystem(); repl_config.history_save_path = HISTORY_PATH; #endif + +#if CONFIG_IDF_TARGET_ESP32C3 + repl_config.prompt = "esp32c3>"; +#elif CONFIG_IDF_TARGET_ESP32S3 + repl_config.prompt = "esp32s3>"; +#else repl_config.prompt = "esp32>"; +#endif + printf("!!!ready!!!\n"); + // init console REPL environment ESP_ERROR_CHECK(esp_console_new_repl_uart(&uart_config, &repl_config, &repl)); diff --git a/examples/bluetooth/esp_ble_mesh/ble_mesh_console/main/ble_mesh_register_cmd.c b/examples/bluetooth/esp_ble_mesh/ble_mesh_console/main/ble_mesh_register_cmd.c index 34006c822f..6fbe3f45b2 100644 --- a/examples/bluetooth/esp_ble_mesh/ble_mesh_console/main/ble_mesh_register_cmd.c +++ b/examples/bluetooth/esp_ble_mesh/ble_mesh_console/main/ble_mesh_register_cmd.c @@ -159,7 +159,7 @@ void ble_mesh_register_mesh_node(void) int ble_mesh_register_cb(int argc, char** argv) { - ESP_LOGE(TAG, "enter %s\n", __func__); + ESP_LOGD(TAG, "enter %s\n", __func__); ble_mesh_node_init(); esp_ble_mesh_register_prov_callback(ble_mesh_prov_cb); esp_ble_mesh_register_custom_model_callback(ble_mesh_model_cb);