修复272运动死机
authorpenglei <1624952103@qq.com>
Sat, 29 Nov 2025 08:40:40 +0000 (16:40 +0800)
committerpenglei <1624952103@qq.com>
Sat, 29 Nov 2025 08:40:40 +0000 (16:40 +0800)
code/sdk/zhihui/drivers/ppg/hx3695/hx3695.c
code/sdk/zhihui/services/gnss/src/uart_gnss.c

index bf5f5c2..24009f8 100644 (file)
@@ -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();\r
                        DEBUG_PRINTF("HRS: %d %d\r\n",hrs_result.data_cnt, hrs_result.hr_result);\r
                        // printf("hr:%d, living:%d, wear_status:%d\n", hrs_result.hr_result,hrs_result.living_status,wear_status);\r
-            if(hrs_result.living_status == MSG_LIVING_TRUE)\r
+   \r
+            if(uapi_dev_runtime_get_train_status())\r
             {\r
-                living_wear_cnt = 0;\r
-\r
                 if(hrs_result.hr_result >= 30 && hrs_result.hr_result <= 210)\r
                     get_avg_hrs(hrs_result.hr_result);\r
-\r
-                living_status = 1;\r
             }\r
-            else if(hrs_result.living_status == MSG_LIVING_FAIL)\r
+            else\r
             {\r
-                living_wear_cnt++;\r
-                if(living_wear_cnt >= 5)\r
+                if(hrs_result.living_status == MSG_LIVING_TRUE)\r
                 {\r
-                    avg_hrs = 0;\r
-                    living_status = 2;\r
-                    wear_status = 0;\r
-                    wear_status_pre = 0;\r
-                    hx3695_unwearstatus_update();\r
                     living_wear_cnt = 0;\r
+\r
+                    if(hrs_result.hr_result >= 30 && hrs_result.hr_result <= 210)\r
+                        get_avg_hrs(hrs_result.hr_result);\r
+\r
+                    living_status = 1;\r
+                }\r
+                else if(hrs_result.living_status == MSG_LIVING_FAIL)\r
+                {\r
+                    living_wear_cnt++;\r
+                    if(living_wear_cnt >= 5)\r
+                    {\r
+                        avg_hrs = 0;\r
+                        living_status = 2;\r
+                        wear_status = 0;\r
+                        wear_status_pre = 0;\r
+                        hx3695_unwearstatus_update();\r
+                        living_wear_cnt = 0;\r
+                    }\r
+                }\r
+                else\r
+                {\r
+                    living_wear_cnt = 0;\r
+                    living_status = 0;\r
                 }\r
-            }\r
-            else\r
-            {\r
-                living_wear_cnt = 0;\r
-                living_status = 0;\r
             }\r
 \r
                        break;\r
index 10ae4b2..33a073b 100644 (file)
@@ -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)
 {