From 79cd442dec3648bc30be8339c726d4cd64e842da Mon Sep 17 00:00:00 2001 From: 1624952103 Date: Wed, 25 Feb 2026 09:45:02 +0800 Subject: [PATCH] =?utf8?q?=E4=BC=98=E5=8C=96=E5=BF=83=E7=8E=87=E8=AE=A1?= =?utf8?q?=E7=AE=97=EF=BC=8C=E4=BC=98=E5=8C=96=E5=85=B3=E6=9C=BA=E5=87=BD?= =?utf8?q?=E6=95=B0=E6=89=A7=E8=A1=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- code/sdk/zhihui/drivers/cywee/dml/cywee_dml.c | 16 ++++++------- code/sdk/zhihui/drivers/ppg/hx3695/hx3695.c | 24 +++++++++---------- code/sdk/zhihui/utils/custom_utils.c | 2 +- 3 files changed, 21 insertions(+), 21 deletions(-) diff --git a/code/sdk/zhihui/drivers/cywee/dml/cywee_dml.c b/code/sdk/zhihui/drivers/cywee/dml/cywee_dml.c index e32b8c852..7eeb55564 100644 --- a/code/sdk/zhihui/drivers/cywee/dml/cywee_dml.c +++ b/code/sdk/zhihui/drivers/cywee/dml/cywee_dml.c @@ -1411,7 +1411,7 @@ void cywee_get_gsensor_data(uint8_t cnt, gsenson_t t[]) // 初始化输出数组(避免脏数据) memset(t, 0, sizeof(gsenson_t) * cnt); // if(g_mutex.mutex != NULL) - osal_mutex_lock(&g_mutex); + // osal_mutex_lock(&g_mutex); uint8_t actual_read = 0; // 实际读取的新数据组数 // CWM_OS_dbgPrintf("[GET_DATA] 取数前 - num_flag=%d, left_flag=%d, cnt=%d\n", num_flag, left_flag, cnt); @@ -1435,7 +1435,7 @@ void cywee_get_gsensor_data(uint8_t cnt, gsenson_t t[]) actual_read++; } // if(g_mutex.mutex != NULL) - osal_mutex_unlock(&g_mutex); + // osal_mutex_unlock(&g_mutex); // 2. 数据不足时,复用历史数据补全 if(actual_read < cnt) { @@ -1967,7 +1967,7 @@ void CWM_APSensorDataOutput_listen(const dml_sensorData_t * pSdo) if(AccdataCount < 25) { // if(g_mutex.mutex != NULL) - osal_mutex_lock(&g_mutex); + // osal_mutex_lock(&g_mutex); if (pSdo->validData & DML_SENSOR_DATA_VALID_DT) { @@ -2031,7 +2031,7 @@ void CWM_APSensorDataOutput_listen(const dml_sensorData_t * pSdo) AccdataCount++; } // if(g_mutex.mutex != NULL) - osal_mutex_unlock(&g_mutex); + // osal_mutex_unlock(&g_mutex); } @@ -2370,10 +2370,10 @@ int cywee_start(void) g_sport_timer = osTimerNew((osTimerFunc_t)cywee_service_check_timer_callback, osTimerPeriodic, NULL, NULL); - int ret = osal_mutex_init(&g_mutex); - if (ret != 0) { - printf("osal_mutex_init g_mutex failed\n"); - } + // int ret = osal_mutex_init(&g_mutex); + // if (ret != 0) { + // printf("osal_mutex_init g_mutex failed\n"); + // } //cywee_inactivity_mode_change(INACTIVITY_MODE_SEDENTARY_AND_NAP); //cywee_inactivity_mode_change(INACTIVITY_MODE_SLEEPING); diff --git a/code/sdk/zhihui/drivers/ppg/hx3695/hx3695.c b/code/sdk/zhihui/drivers/ppg/hx3695/hx3695.c index b91493947..879ae6bd9 100644 --- a/code/sdk/zhihui/drivers/ppg/hx3695/hx3695.c +++ b/code/sdk/zhihui/drivers/ppg/hx3695/hx3695.c @@ -1367,18 +1367,18 @@ static void get_avg_hrs(uint8_t hrs) avg_hrs = (sum_hrs - max_hrs - min_hrs) / valid_count; - if (last_hrs >= 30 && last_hrs <= 210) - { - int16_t diff = avg_hrs - last_hrs; - if (abs(diff) > 10) - { - if (diff > 0) - avg_hrs = last_hrs + 5; - else - avg_hrs = last_hrs - 5; - } - } - last_hrs = avg_hrs; + // if (last_hrs >= 30 && last_hrs <= 210) + // { + // int16_t diff = avg_hrs - last_hrs; + // if (abs(diff) > 10) + // { + // if (diff > 0) + // avg_hrs = last_hrs + 5; + // else + // avg_hrs = last_hrs - 5; + // } + // } + // last_hrs = avg_hrs; // printf("max_hrs[%d],min_hrs[%d],avg_hrs[%d]\n",max_hrs,min_hrs,avg_hrs); } } diff --git a/code/sdk/zhihui/utils/custom_utils.c b/code/sdk/zhihui/utils/custom_utils.c index a4018802b..b3fd8551d 100644 --- a/code/sdk/zhihui/utils/custom_utils.c +++ b/code/sdk/zhihui/utils/custom_utils.c @@ -483,7 +483,7 @@ void shutdown_reboot_prejobs_task(void) while(1) { - LOS_Msleep(10); + } } -- 2.17.1