gengxin
author@CHENG <2393524978@qq.com>
Sat, 16 Mar 2024 08:46:25 +0000 (16:46 +0800)
committer@CHENG <2393524978@qq.com>
Sat, 16 Mar 2024 08:46:25 +0000 (16:46 +0800)
2.sdk/sdk/gui/lv_watch/lv_apps/health_measure/health_measure.c
2.sdk/sdk/gui/lv_watch/lv_apps/setting/setting_about.c

index eff1370..d795416 100644 (file)
@@ -380,6 +380,11 @@ bool mmi_health_measure_heart_timed_action(bool direct_trigger, uint32_t cur_tim
                if(true == direct_trigger 
                        || s_health_measure_timed_data.heart_timed_interval <= (cur_time_stamp - s_health_measure_heart_timed_time_stamp))
                {
+                       if(true == direct_trigger)
+                       {
+                               s_health_measure_heart_timed_time_stamp = 0;
+                       }
+                       
                        HEALTH_MEASURE_DEBUG_PRINTF("[@CHENG_DEBUG][%s][%d]: cur_stamp=%d,timed_stamp=%d\n", __FUNCTION__, __LINE__, cur_time_stamp, s_health_measure_heart_timed_time_stamp);
                        
                        //char info_buf[64] = {0};
@@ -406,6 +411,11 @@ bool mmi_health_measure_temperature_timed_action(bool direct_trigger, uint32_t c
                if(true == direct_trigger 
                        || s_health_measure_timed_data.temperature_timed_interval <= (cur_time_stamp - s_health_measure_temperature_timed_time_stamp))
                {
+                       if(true == direct_trigger)
+                       {
+                               s_health_measure_temperature_timed_time_stamp = 0;
+                       }
+                       
                        HEALTH_MEASURE_DEBUG_PRINTF("[@CHENG_DEBUG][%s][%d]: cur_stamp=%d,timed_stamp=%d\n", __FUNCTION__, __LINE__, cur_time_stamp, s_health_measure_temperature_timed_time_stamp);
                        
                        mmi_health_measure_timed_list_node_add(MMI_HEALTH_MEASURE_TEMPERATURE);
@@ -428,6 +438,11 @@ bool mmi_health_measure_blood_timed_action(bool direct_trigger, uint32_t cur_tim
                if(true == direct_trigger 
                        || s_health_measure_timed_data.blood_timed_interval <= (cur_time_stamp - s_health_measure_blood_timed_time_stamp))
                {
+                       if(true == direct_trigger)
+                       {
+                               s_health_measure_blood_timed_time_stamp = 0;
+                       }
+                       
                        mmi_health_measure_timed_list_node_add(MMI_HEALTH_MEASURE_BLOOD);
                        if(true == mmi_health_measure_timed_list_trigger(MMI_HEALTH_MEASURE_BLOOD))
                        {
@@ -449,6 +464,11 @@ bool mmi_health_measure_spo2_timed_action(bool direct_trigger, uint32_t cur_time
                        || s_health_measure_timed_data.spo2_timed_interval <= (cur_time_stamp - s_health_measure_spo2_timed_time_stamp)
                        )
                {
+                       if(true == direct_trigger)
+                       {
+                               s_health_measure_spo2_timed_time_stamp = 0;
+                       }
+                       
                        mmi_health_measure_timed_list_node_add(MMI_HEALTH_MEASURE_SPO2);
                        if(true == mmi_health_measure_timed_list_trigger(MMI_HEALTH_MEASURE_SPO2))
                        {
index 8f481f9..925770e 100644 (file)
@@ -82,6 +82,8 @@ static lv_obj_t * setting_about_create(lv_obj_t * activity_obj)
 
     lv_obj_t * content = lv_cont_create(obj, NULL);
     lv_obj_set_size(content, lv_obj_get_width(obj), lv_obj_get_height(obj));
+    //lv_cont_set_fit2(content, LV_FIT_NONE, LV_FIT_TIGHT);
+    //lv_obj_set_width(content, lv_obj_get_width(obj));
     lv_obj_add_style(content, LV_CONT_PART_MAIN, &lv_watch_style_transp);
     lv_obj_align(content, NULL, LV_ALIGN_IN_TOP_LEFT, 0, 0);
     lv_obj_set_click(content, true);
@@ -146,6 +148,32 @@ static lv_obj_t * setting_about_create(lv_obj_t * activity_obj)
 #endif
 #endif
 
+#if USE_FR8012HAQ
+    lv_obj_t * bt_label = lv_label_create(content, NULL);
+#ifdef USE_LV_WATCH_UI_466_466
+    lv_obj_add_style(bt_label, LV_LABEL_PART_MAIN, &lv_watch_font40);
+    lv_label_set_long_mode(bt_label, LV_LABEL_LONG_BREAK);
+       lv_obj_set_width(bt_label, LV_HOR_RES - 60);
+#else
+    lv_obj_add_style(bt_label, LV_LABEL_PART_MAIN, &lv_watch_font26);
+    lv_label_set_long_mode(bt_label, LV_LABEL_LONG_BREAK);
+       lv_obj_set_width(bt_label, LV_HOR_RES - 20);
+#endif
+    lv_label_set_align(bt_label, LV_LABEL_ALIGN_CENTER);
+       snprintf(info_str, 96, "bt:%s", fr8012haq_Versions_get());
+       lv_label_set_text(bt_label, info_str);
+#ifdef USE_LV_WATCH_UI_CIRCLE
+       #ifdef USE_LV_WATCH_UI_466_466
+       lv_obj_align(bt_label, info_label, LV_ALIGN_OUT_BOTTOM_MID, 0, 50);
+       #else
+       lv_obj_align(bt_label, info_label, LV_ALIGN_OUT_BOTTOM_MID, 0, 20);
+       #endif
+#else
+       lv_obj_align(bt_label, info_label, LV_ALIGN_OUT_BOTTOM_MID, 0, 80);
+#endif
+    lv_obj_set_click(bt_label, false);
+#endif
+       
     lv_obj_set_event_cb(content, setting_about_click_event_cb);
     lv_watch_obj_add_element(content);