From 6637d898cbbdaa7ba3cf03b4bf2c0d5bef8d2a2b Mon Sep 17 00:00:00 2001 From: zwsd Date: Thu, 4 Aug 2022 10:47:25 +0800 Subject: [PATCH] update device name --- main/ble_spp_server_demo.c | 4 ++-- main/main.c | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/main/ble_spp_server_demo.c b/main/ble_spp_server_demo.c index fa14b3b..7c6ef41 100644 --- a/main/ble_spp_server_demo.c +++ b/main/ble_spp_server_demo.c @@ -34,7 +34,7 @@ static uint16_t table_handle_m; #define SPP_PROFILE_NUM 1 #define SPP_PROFILE_APP_IDX 0 #define ESP_SPP_APP_ID 0x56 -#define SAMPLE_DEVICE_NAME "ESP_SPP_SERVER" // The Device Name Characteristics in GAP +#define SAMPLE_DEVICE_NAME s_module->bleName // The Device Name Characteristics in GAP #define SPP_SVC_INST_ID 0 /// SPP Service @@ -55,7 +55,7 @@ static const uint8_t spp_adv_data[23] = { /* Complete List of 16-bit Service Class UUIDs */ 0x03, 0x03, 0xF0, 0xAB, /* Complete Local Name in advertising */ - 0x0F, 0x09, 'E', 'S', 'P', '_', 'S', 'P', 'P', '_', 'S', 'E', 'R', 'V', 'E', 'R'}; + 0x0B, 0x09, 'y', 'i', 'm', 'e', 'i', '_', 'b', 'l', 'e'}; static uint16_t spp_mtu_size = 23; static uint16_t spp_conn_id = 0xffff; diff --git a/main/main.c b/main/main.c index 4ceb901..55a19d2 100644 --- a/main/main.c +++ b/main/main.c @@ -127,6 +127,7 @@ void process_setPosition(cJSON *rxjson) { if (cJSON_IsNumber(cJSON_GetObjectItem(rxjson, "direction"))) { direction = cJSON_GetNumberValue(cJSON_GetObjectItem(rxjson, "direction")); } + ESP_LOGI(MAIN_LOG_TAG, "index = %d,speedLevel = %d,position = %lf,direction = %d", index, speedLevel, position, direction); setPosition_code = motor_run_to_postion(1, position, 0); order_receipt_setPosition(index, setPosition_code); }