gengxin
author@CHENG <2393524978@qq.com>
Sun, 28 Apr 2024 06:41:38 +0000 (14:41 +0800)
committer@CHENG <2393524978@qq.com>
Sun, 28 Apr 2024 06:41:38 +0000 (14:41 +0800)
2.sdk/sdk/gui/lv_watch/lv_apps/health_measure/health_measure.c

index b1432c3..31178ca 100644 (file)
@@ -119,19 +119,19 @@ void mmi_hsensor_blood_glucose_value_get(float * blood_glucose_value)
        
        if(8 > cur_time.tm_hour)
                t_value = 4.0;
-       else if(9 >= cur_time.tm_hour)
+       else if(9 > cur_time.tm_hour)
                t_value = 6.0;
-       else if(12 >= cur_time.tm_hour)
+       else if(12 > cur_time.tm_hour)
                t_value = 5.0;
-       else if(13 >= cur_time.tm_hour)
+       else if(13 > cur_time.tm_hour)
                t_value = 6.0;
-       else if(14 >= cur_time.tm_hour)
+       else if(14 > cur_time.tm_hour)
                t_value = 7.0;
-       else if(17 >= cur_time.tm_hour)
+       else if(17 > cur_time.tm_hour)
                t_value = 5.0;
-       else if(19 >= cur_time.tm_hour)
+       else if(19 > cur_time.tm_hour)
                t_value = 6.0;
-       else if(20 >= cur_time.tm_hour)
+       else if(20 > cur_time.tm_hour)
                t_value = 5.0;
        else
                t_value = 4.0;
@@ -940,6 +940,9 @@ bool mmi_health_measure_timed_measure_start(MMI_HEALTH_MEASURE_TYPE_E measure_ty
 {
        if(false == mmi_health_measure_wear_state_get())
                return false;
+
+       if(HAL_CHG_CONNECTED == Hal_Charger_Get_Status())
+               return false;
        
        if(NULL != lv_watch_get_activity_obj(ACT_ID_FACTORY_MODE_MAIN))
                return false;
@@ -978,6 +981,9 @@ void mmi_health_measure_app_measure_start(MMI_HEALTH_MEASURE_TYPE_E measure_type
        
        if(false == mmi_health_measure_wear_state_get())
                return;
+
+       if(HAL_CHG_CONNECTED == Hal_Charger_Get_Status())
+               return;
        
        if(NULL != lv_watch_get_activity_obj(ACT_ID_FACTORY_MODE_MAIN))
                return;