From: penglei <1624952103@qq.com> Date: Sat, 29 Nov 2025 08:40:40 +0000 (+0800) Subject: 修复272运动死机 X-Git-Url: http://git.snicker.com.cn/css/static/gitweb.css?a=commitdiff_plain;h=91f4e2cde84b6806a04542ea5fda796339e42400;p=mirrors%2FFD230.git 修复272运动死机 --- diff --git a/code/sdk/zhihui/drivers/ppg/hx3695/hx3695.c b/code/sdk/zhihui/drivers/ppg/hx3695/hx3695.c index bf5f5c2a9..24009f8ae 100644 --- a/code/sdk/zhihui/drivers/ppg/hx3695/hx3695.c +++ b/code/sdk/zhihui/drivers/ppg/hx3695/hx3695.c @@ -1384,32 +1384,41 @@ void hx3695_alg_send_data(ppg_sensor_data_t *ppg_sensor_dat, WORK_MODE_T mode, u hrs_result = tyhx_hrs_alg_get_results(); DEBUG_PRINTF("HRS: %d %d\r\n",hrs_result.data_cnt, hrs_result.hr_result); // printf("hr:%d, living:%d, wear_status:%d\n", hrs_result.hr_result,hrs_result.living_status,wear_status); - if(hrs_result.living_status == MSG_LIVING_TRUE) + + if(uapi_dev_runtime_get_train_status()) { - living_wear_cnt = 0; - if(hrs_result.hr_result >= 30 && hrs_result.hr_result <= 210) get_avg_hrs(hrs_result.hr_result); - - living_status = 1; } - else if(hrs_result.living_status == MSG_LIVING_FAIL) + else { - living_wear_cnt++; - if(living_wear_cnt >= 5) + if(hrs_result.living_status == MSG_LIVING_TRUE) { - avg_hrs = 0; - living_status = 2; - wear_status = 0; - wear_status_pre = 0; - hx3695_unwearstatus_update(); living_wear_cnt = 0; + + if(hrs_result.hr_result >= 30 && hrs_result.hr_result <= 210) + get_avg_hrs(hrs_result.hr_result); + + living_status = 1; + } + else if(hrs_result.living_status == MSG_LIVING_FAIL) + { + living_wear_cnt++; + if(living_wear_cnt >= 5) + { + avg_hrs = 0; + living_status = 2; + wear_status = 0; + wear_status_pre = 0; + hx3695_unwearstatus_update(); + living_wear_cnt = 0; + } + } + else + { + living_wear_cnt = 0; + living_status = 0; } - } - else - { - living_wear_cnt = 0; - living_status = 0; } break; diff --git a/code/sdk/zhihui/services/gnss/src/uart_gnss.c b/code/sdk/zhihui/services/gnss/src/uart_gnss.c index 10ae4b272..33a073bef 100644 --- a/code/sdk/zhihui/services/gnss/src/uart_gnss.c +++ b/code/sdk/zhihui/services/gnss/src/uart_gnss.c @@ -219,7 +219,7 @@ void gnss_receive_handler(uint8_t *buffer, int32_t size) } #define GNSS_CMD_TASK_MSG_COUNT 128 -#define GNSS_CMD_TASK_SIZE (0x800*2) +#define GNSS_CMD_TASK_SIZE (0x2500) #define GNSS_CMD_TASK_PRIO 4 void create_gnss_uart_queue(void) {