From: penglei <1624952103@qq.com> Date: Mon, 6 Jan 2025 09:59:02 +0000 (+0800) Subject: 优化产测读取心率id,优化读取老化测试标志 X-Git-Tag: v1.3.113-repair_tp~39^2~11 X-Git-Url: http://git.snicker.com.cn/css/static/gitweb.css?a=commitdiff_plain;h=refs%2Fchanges%2F1600%2F1;p=mirrors%2FFD230.git 优化产测读取心率id,优化读取老化测试标志 --- diff --git a/code/sdk/application/wearable/service/factorytest_service/factorytest_protocol.c b/code/sdk/application/wearable/service/factorytest_service/factorytest_protocol.c index 41cdfd472..2bffc865e 100644 --- a/code/sdk/application/wearable/service/factorytest_service/factorytest_protocol.c +++ b/code/sdk/application/wearable/service/factorytest_service/factorytest_protocol.c @@ -2,7 +2,7 @@ * @Author: penglei 1624952103@qq.com * @Date: 2024-06-17 14:31:08 * @LastEditors: penglei 1624952103@qq.com - * @LastEditTime: 2024-11-23 16:04:42 + * @LastEditTime: 2025-01-06 16:20:03 * @FilePath: /FD230/code/sdk/application/wearable/service/factorytest_service/factorytest_protocol.c * @Description: * @@ -982,10 +982,12 @@ void factorytest_protocol_soft_test_decode(uint8_t submode,uint8_t testitem,uint { //查询老化标志 uint8_t send_data[3] = {0}; + do_custom_fileoperate_service_check_msg(CUSTOM_FILEOPERATE_MSG_TYPE_AGING_DATA_READ, NULL, 0); + LOS_Msleep(500); - send_data[1] = aging_t.flag; + send_data[1] = aging_result_t.flag; - if(aging_t.fail_num != 0) + if(aging_result_t.fail_num != 0) { send_data[2] = 0x01; } @@ -1358,6 +1360,11 @@ void factorytest_protocol_soft_test_decode(uint8_t submode,uint8_t testitem,uint //获取 ppg_id uint8_t ppg_id; uapi_ppg_get_id(&ppg_id); + if(ppg_id != 0x65) + { + hx3695_chip_check(); + uapi_ppg_get_id(&ppg_id); + } factorytest_protocol_replymsg(BLE_TEST_CMD_MODE_SOFT_TEST, BLE_TEST_CMD_SOFT_TEST_SUB_MODE_HRS, 0x01, diff --git a/code/sdk/drivers/peripheral/ppg/hx3695/hx3695.c b/code/sdk/drivers/peripheral/ppg/hx3695/hx3695.c index 891767708..8feed29f5 100644 --- a/code/sdk/drivers/peripheral/ppg/hx3695/hx3695.c +++ b/code/sdk/drivers/peripheral/ppg/hx3695/hx3695.c @@ -369,7 +369,7 @@ bool hx3695_chip_check(void) uint8_t i = 0; uint8_t chip_id = 0; hx3695_chip_id = 0; - for(i=0; i<5; i++) + for(i=0; i<10; i++) { hx3695_ppg_on(); hx3695_delay_ms(5);