diff --git a/README.md b/README.md index 52cd786..985a078 100644 --- a/README.md +++ b/README.md @@ -256,10 +256,12 @@ TODO: 15. 检查设备状态 OK TESTOK 14. 支持掉落事件 OK TESTOK - 6. 支持电池电量采集 + 6. 支持电池电量采集 OK 8. 采集完30秒,蜂鸣器滴一声,采集完成,蜂鸣器滴一声 16. 调整UI位置 11. 死机后一直重启的BUG OK + 12. 修改蓝牙名称 + -------------------------------------------------------------- 2. UI添加蓝牙状态 3. UI添加上传状态 diff --git a/app/src/one_conduction/one_conduction_board.h b/app/src/one_conduction/one_conduction_board.h index 32623d8..940eee1 100644 --- a/app/src/one_conduction/one_conduction_board.h +++ b/app/src/one_conduction/one_conduction_board.h @@ -1,7 +1,6 @@ #pragma once #define VERSION 1 #define MANUFACTURER_NAME "iflytop" -#define BLE_NAME "iflytop_test" /******************************************************************************* * INCLUDE * diff --git a/app/src/one_conduction/one_conduction_main.c b/app/src/one_conduction/one_conduction_main.c index 718d748..5e166c9 100644 --- a/app/src/one_conduction/one_conduction_main.c +++ b/app/src/one_conduction/one_conduction_main.c @@ -1,6 +1,7 @@ #include #include "app_event.h" +#include "basic/device_info_mgr.h" #include "basic/zble_module.h" #include "basic/zdatachannel_service.h" #include "ble_cmd_process_service.h" @@ -398,10 +399,14 @@ void one_conduction_main() { ztm_t tm; znordic_rtc_gettime(&tm); NRF_LOG_INFO("RTC time :%d-%d-%d %d:%d:%d", tm.tm_year + 1900, tm.tm_mon + 1, tm.tm_mday, tm.tm_hour, tm.tm_min, tm.tm_sec); + static uint8_t ble_name[20]; + sn_t sn; + device_info_read_sn(&sn); + memcpy(ble_name, sn.sn, sizeof(sn.sn)); static zble_module_cfg_t cfg = // { - .deviceName = BLE_NAME, + .deviceName = ble_name, .on_service_init = on_service_init, }; zble_module_init(&cfg);