From 3908c9ded3942ccc80a0e7b1ead0152fb2a99d49 Mon Sep 17 00:00:00 2001 From: penglei <1624952103@qq.com> Date: Mon, 6 Jan 2025 17:59:02 +0800 Subject: [PATCH] =?utf8?q?=E4=BC=98=E5=8C=96=E4=BA=A7=E6=B5=8B=E8=AF=BB?= =?utf8?q?=E5=8F=96=E5=BF=83=E7=8E=87id=EF=BC=8C=E4=BC=98=E5=8C=96?= =?utf8?q?=E8=AF=BB=E5=8F=96=E8=80=81=E5=8C=96=E6=B5=8B=E8=AF=95=E6=A0=87?= =?utf8?q?=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- .../factorytest_service/factorytest_protocol.c | 13 ++++++++++--- code/sdk/drivers/peripheral/ppg/hx3695/hx3695.c | 2 +- 2 files changed, 11 insertions(+), 4 deletions(-) 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); -- 2.17.1