gengxin
authorCCC <2393524978@qq.com>
Wed, 15 Nov 2023 08:04:39 +0000 (16:04 +0800)
committerCCC <2393524978@qq.com>
Wed, 15 Nov 2023 08:04:39 +0000 (16:04 +0800)
13 files changed:
2.sdk/sdk/gui/lv_watch/lv_apps/factory_mode/factory_mode_autotest.c
2.sdk/sdk/gui/lv_watch/lv_apps/factory_mode/factory_mode_main.c
2.sdk/sdk/gui/lv_watch/lv_apps/factory_mode/factory_mode_test.c
2.sdk/sdk/gui/lv_watch/lv_apps/mmi_video_call/mmi_video_call_fzd.c
2.sdk/sdk/gui/lv_watch/lv_apps/mmi_video_call/mmi_video_call_tongxin.c
2.sdk/sdk/gui/lv_watch/lv_apps/mmi_video_call/mmi_video_call_wulian.c
2.sdk/sdk/gui/lv_watch/lv_apps/mmi_wechat/wechat.c
2.sdk/sdk/gui/lv_watch/lv_apps/mmi_wechat/wechat_circle.c
2.sdk/sdk/gui/lv_watch/lv_apps/setting/setting_about.c
2.sdk/sdk/gui/lv_watch/mmi_protocol/mmi_protocol_api.c
2.sdk/sdk/gui/lv_watch/mmi_protocol/mmi_protocol_fzd.c
2.sdk/sdk/gui/lv_watch/mmi_protocol/mmi_protocol_fzd.h
2.sdk/sdk/gui/lv_watch/mmi_protocol/mmi_protocol_fzd_content.c

index aba371c..40ed9b7 100644 (file)
@@ -67,7 +67,9 @@ const struct {
     { AUTOTEST_CALL, WATCH_TEXT_ID_CALL, autotest_call_create },
     { AUTOTEST_MEMORY, WATCH_TEXT_ID_MEMORY, autotest_memory_create },
     { AUTOTEST_BACKLIGHT, WATCH_TEXT_ID_BACKLIGHT, autotest_backlight_create },
+#ifndef __MMI_ZHSX_SUPPORT__
     { AUTOTEST_GRAVITY, WATCH_TEXT_ID_GRAVITY, autotest_gravity_create },
+#endif
     { AUTOTEST_BATTERY, WATCH_TEXT_ID_BATTERY, autotest_battery_create },
     { AUTOTEST_VIBRATION, WATCH_TEXT_ID_VIBRATION, autotest_vibration_create },
     { AUTOTEST_WIFI, WATCH_TEXT_ID_TR_WIFI, autotest_wifi_create },
index f12eec7..1efa2f0 100644 (file)
@@ -80,13 +80,15 @@ const struct {
 #if USE_GPS
     { WATCH_TEXT_ID_GPS_TEST,        factorymode_gps_create_btn_cb },
 #endif
-#ifdef __MMI_ZHSX_SUPPORT__
+#if 1 // def __MMI_ZHSX_SUPPORT__
+       #ifdef __MMI_ZHSX_SUPPORT_HEALTH_SENSOR__
        { WATCH_TEXT_ID_TEMPERATURE_TEST, mmi_factorymode_temperature_test_create_btn_cb },
        { WATCH_TEXT_ID_HEART_TEST, mmi_factorymode_heart_test_create_btn_cb },
        { WATCH_TEXT_ID_SPO2_TEST, mmi_factorymode_spo2_test_create_btn_cb },
     #if USE_HX3918
     { WATCH_TEXT_ID_HANGING_CALI, mmi_factorymode_hanging_cali_create_btn_cb },
     #endif
+       #endif
 #else
     { WATCH_TEXT_ID_SH_TEMP_MEASURE_START, factorymode_temperature_test_create_btn_cb },
     { WATCH_TEXT_ID_HR_BP_BO_TEST, factorymode_hr_bp_bo_test_create_btn_cb },
index fb20aab..b7398b5 100644 (file)
@@ -24,10 +24,12 @@ enum {
     NONE = 0,
     FAC_SOS_KEY,
     GSENSOR,
-#ifdef __MMI_ZHSX_SUPPORT__
+#if 1 // def __MMI_ZHSX_SUPPORT__
+#ifdef __MMI_ZHSX_SUPPORT_HEALTH_SENSOR__
        FAC_TEMPERATURE,
     FAC_HEART,
     FAC_SPO2,
+#endif
 #else
     HEART_RATE,
     SPORT_HEART_RATE,
@@ -83,14 +85,16 @@ static void factorymode_gps_location_info_update(lv_anim_t * anim);
 static lv_obj_t * factorymode_gps_test_create(lv_obj_t * activity_obj);
 #endif
 
-#ifdef __MMI_ZHSX_SUPPORT__
+#if 1 // def __MMI_ZHSX_SUPPORT__
 static lv_obj_t * mmi_factorymode_gsensor_create(lv_obj_t * activity_obj);
+#ifdef __MMI_ZHSX_SUPPORT_HEALTH_SENSOR__
 static lv_obj_t * mmi_factorymode_temperature_test_create(lv_obj_t * activity_obj);
 static lv_obj_t * mmi_factorymode_heart_test_create(lv_obj_t * activity_obj);
 static lv_obj_t * mmi_factorymode_spo2_test_create(lv_obj_t * activity_obj);
 #if USE_HX3918
 static lv_obj_t * mmi_factorymode_hanging_cali_create(lv_obj_t * activity_obj);
 #endif
+#endif
 #else
 static lv_obj_t * factorymode_gsensor_create(lv_obj_t * activity_obj);
 static void factorymode_hr_bp_bo_test_status_update(lv_anim_t * anim);
@@ -137,15 +141,17 @@ static void factorymode_test_prepare_destory(lv_obj_t * activity_obj)
 #endif
             break;
 
-#ifdef __MMI_ZHSX_SUPPORT__
+#if 1 // def __MMI_ZHSX_SUPPORT__
+       #ifdef __MMI_ZHSX_SUPPORT_HEALTH_SENSOR__
                case FAC_TEMPERATURE:
-                       mmi_tsensor_temperature_measure_stop();
+                       mmi_tsensor_close();
                        break;
                        
                case FAC_HEART:
                case FAC_SPO2:
-                       mmi_hsensor_measure_stop();
+                       mmi_hsensor_close();
                        break;
+       #endif
 #else
         case HEART_RATE:
         case SPORT_HEART_RATE:
@@ -1093,7 +1099,7 @@ static lv_obj_t * factorymode_gps_test_create(lv_obj_t * activity_obj)
 }
 #endif
 
-#ifdef __MMI_ZHSX_SUPPORT__
+#if 1 // def __MMI_ZHSX_SUPPORT__
 static void mmi_factorymode_gsensor_status_update(lv_anim_t * anim)
 {
 #if 1
@@ -1634,13 +1640,16 @@ void factorymode_gsensor_create_btn_cb(lv_obj_t * btn,lv_event_t e)
     }
 }
 
-#ifdef __MMI_ZHSX_SUPPORT__
+#if 1 // def __MMI_ZHSX_SUPPORT__
+#ifdef __MMI_ZHSX_SUPPORT_HEALTH_SENSOR__
 // temperature
 static void mmi_factorymode_temperature_update(lv_anim_t * anim)
 {
     char str[32]= {0};
+       float body_temp_value = 0.0;
        
-    sprintf(str, "body temp:\n    %.2f %s", mmi_tsensor_body_temperature_get(), (char *)lv_lang_get_text(WATCH_TEXT_ID_TEMPERATURE_UNIT));
+       mmi_tsensor_body_value_get(&body_temp_value);
+    sprintf(str, "body temp:\n    %.2f %s", body_temp_value, (char *)lv_lang_get_text(WATCH_TEXT_ID_TEMPERATURE_UNIT));
     lv_label_set_text(anim->var,str);
 }
 
@@ -1672,7 +1681,7 @@ static lv_obj_t * mmi_factorymode_temperature_test_create(lv_obj_t * activity_ob
     lv_obj_set_click(content, false);
 
     testing_st = FAC_TEMPERATURE;
-    mmi_tsensor_temperature_measure_start();
+    mmi_tsensor_open();
 
     lv_obj_t * label = lv_label_create(content, NULL);
 #if USE_LV_WATCH_UI_360_360
@@ -1719,7 +1728,7 @@ static void mmi_factorymode_heart_test_status_update(lv_anim_t * anim)
     char str[32]= {0};
     uint16_t hr_value = 0;
        
-    mmi_hsensor_measure_value_get(&hr_value, NULL, NULL, NULL);
+       mmi_hsensor_heart_value_get(&hr_value);
     sprintf(str, "%s: %d bpm", (char *)lv_lang_get_text(WATCH_TEXT_ID_HEART_RATE), hr_value);
     lv_label_set_text(anim->var, str);
 }
@@ -1752,8 +1761,7 @@ static lv_obj_t * mmi_factorymode_heart_test_create(lv_obj_t * activity_obj)
     lv_obj_set_click(content, false);
 
     testing_st = FAC_HEART;
-    mmi_hsensor_measure_stop();
-       mmi_hsensor_hr_measure_start();
+       mmi_hsensor_heart_open();
 
     lv_obj_t * label = lv_label_create(content, NULL);
 #if USE_LV_WATCH_UI_360_360
@@ -1767,9 +1775,8 @@ static lv_obj_t * mmi_factorymode_heart_test_create(lv_obj_t * activity_obj)
 #endif
 
     char str[32]= {0};
-    uint16_t hr_value = 0;
-    mmi_hsensor_measure_value_get(&hr_value, NULL, NULL, NULL);
-    sprintf(str, "%s: %d bpm", (char *)lv_lang_get_text(WATCH_TEXT_ID_HEART_RATE), hr_value);
+
+    sprintf(str, "%s: ", (char *)lv_lang_get_text(WATCH_TEXT_ID_HEART_RATE));
     lv_label_set_text(label,str);
 
     lv_anim_path_t path;
@@ -1802,8 +1809,8 @@ static void mmi_factorymode_spo2_test_status_update(lv_anim_t * anim)
     char str[32]= {0};
     uint16_t spo2_value = 0;
        
-    mmi_hsensor_measure_value_get(NULL, NULL, NULL, &spo2_value);
-    sprintf(str, "%s : %d%%", (char *)lv_lang_get_text(WATCH_TEXT_ID_BLOOD_OXYGEN), spo2_value);
+       mmi_hsensor_spo2_value_get(&spo2_value);
+    sprintf(str, "%s: %d%%", (char *)lv_lang_get_text(WATCH_TEXT_ID_BLOOD_OXYGEN), spo2_value);
     lv_label_set_text(anim->var, str);
 }
 
@@ -1835,8 +1842,7 @@ static lv_obj_t * mmi_factorymode_spo2_test_create(lv_obj_t * activity_obj)
     lv_obj_set_click(content, false);
 
     testing_st = FAC_SPO2;
-    mmi_hsensor_measure_stop();
-       mmi_hsensor_spo2_measure_start();
+       mmi_hsensor_spo2_open();
 
     lv_obj_t * label = lv_label_create(content, NULL);
 #if USE_LV_WATCH_UI_360_360
@@ -1850,9 +1856,8 @@ static lv_obj_t * mmi_factorymode_spo2_test_create(lv_obj_t * activity_obj)
 #endif
 
     char str[32]= {0};
-    uint16_t spo2_value = 0;
-    mmi_hsensor_measure_value_get(NULL, NULL, NULL, &spo2_value);
-    sprintf(str, "%s : %d%%", (char *)lv_lang_get_text(WATCH_TEXT_ID_BLOOD_OXYGEN), spo2_value);
+
+    sprintf(str, "%s: ", (char *)lv_lang_get_text(WATCH_TEXT_ID_BLOOD_OXYGEN));
     lv_label_set_text(label, str);
 
     lv_anim_path_t path;
@@ -2031,6 +2036,8 @@ void mmi_factorymode_hanging_cali_create_btn_cb(lv_obj_t * btn,lv_event_t e)
     }
 }
 #endif
+#endif
+
 #else
 
 static void factorymode_hr_bp_bo_test_status_update(lv_anim_t * anim)
index 0dbfc3b..cdee946 100644 (file)
@@ -127,7 +127,8 @@ static void voip_phone_left_slide_callback(lv_obj_t * obj)
 {
     printf("%s %d\n", __FUNCTION__, __LINE__);
         if((MMI_VIDEO_CALL_STATE_CALLING == s_video_call_params.state)
-                && (MODEM_VIDEO_CALL_TYPE_VIDEO == s_video_call_params.call_type)) {
+                && (MODEM_VIDEO_CALL_TYPE_VIDEO == s_video_call_params.call_type))
+               {
             voip_local_remote_switch_action(NULL, LV_EVENT_CLICKED);
         }
 }
@@ -215,8 +216,8 @@ static lv_obj_t * mmi_vc_ring_off_content_create(lv_obj_t * par)
     if(content == NULL) {
         return(NULL);
     }
-
-    lv_obj_add_style(content, LV_OBJ_PART_MAIN, &lv_watch_cont_opa1);
+    lv_obj_set_style_local_radius(content, LV_CONT_PART_MAIN, LV_STATE_DEFAULT, 15);
+    //lv_obj_add_style(content, LV_OBJ_PART_MAIN, &lv_watch_cont_opa1);
     lv_obj_set_size(content, LV_HOR_RES - 40, 50);
        lv_obj_align(content, obj, LV_ALIGN_CENTER, 0, -10);
     lv_cont_set_layout(content, LV_LAYOUT_CENTER);
@@ -447,10 +448,12 @@ void mmi_vc_ring_off_screen(void)
     lv_vc_call_obj_ext_t * ext = mmi_vc_call_get_ext();
     if(NULL != ext) 
        {
-           if(ext->vc_ui == MMI_VC_UI_INCOMING || ext->vc_ui == MMI_VC_UI_DIALING) 
+           //if(ext->vc_ui == MMI_VC_UI_INCOMING || ext->vc_ui == MMI_VC_UI_DIALING) 
                {
-               if(ext->phone_status_label) {
-                   lv_label_set_text(ext->phone_status_label, "");
+               if(ext->phone_status_label)
+                       {
+                   //lv_label_set_text(ext->phone_status_label, "");
+                               lv_obj_set_hidden(ext->phone_status_label, true);
                }
            }
         mmi_vc_ring_off_content_create(mmi_vc_call_get_obj());
@@ -932,7 +935,11 @@ static void mmi_vc_ui_dialing(lv_obj_t * content)
        {
         lv_label_set_text(label, s_video_call_params.number);
     }
+#if USE_LV_WATCH_UI_240_280
+       lv_obj_align(label, img, LV_ALIGN_OUT_BOTTOM_MID, 0, 20);
+#else
        lv_obj_align(label, img, LV_ALIGN_OUT_BOTTOM_MID, 0, 10);
+#endif
     lv_obj_set_click(label, false);
 
        #if 0
@@ -997,7 +1004,11 @@ static void mmi_vc_ui_incoming(lv_obj_t * content)
        {
         lv_label_set_text(label, s_video_call_params.number);
     }
+#if USE_LV_WATCH_UI_240_280
+       lv_obj_align(label, img, LV_ALIGN_OUT_BOTTOM_MID, 0, 20);
+#else
        lv_obj_align(label, img, LV_ALIGN_OUT_BOTTOM_MID, 0, 10);
+#endif
     lv_obj_set_click(label, false);
 
     // btn ring off
@@ -1057,7 +1068,11 @@ static void mmi_vc_ui_connecting(lv_obj_t * content)
        {
                lv_label_set_text(label, s_video_call_params.number);
        }
+#if USE_LV_WATCH_UI_240_280
+       lv_obj_align(label, img, LV_ALIGN_OUT_BOTTOM_MID, 0, 20);
+#else
        lv_obj_align(label, img, LV_ALIGN_OUT_BOTTOM_MID, 0, 10);
+#endif
        lv_obj_set_click(label, false);
 
     // btn ring off
@@ -1165,7 +1180,7 @@ static void mmi_vc_ui_connected(lv_obj_t * content)
             label = lv_label_create(canvas, NULL);
             lv_obj_add_style(label, LV_OBJ_PART_MAIN, &lv_watch_font20);
             lv_label_set_align(label, LV_LABEL_ALIGN_CENTER);
-            lv_label_set_text(label, "0:0");
+            lv_label_set_text(label, "00:00");
             lv_obj_set_click(label, false);
             lv_obj_set_base_dir(label, LV_BIDI_DIR_LTR);
                        lv_obj_align(label, NULL, LV_ALIGN_IN_TOP_MID, 0, 0);
@@ -1222,7 +1237,7 @@ static void mmi_vc_ui_connected(lv_obj_t * content)
             label = lv_label_create(canvas, NULL);
             lv_obj_add_style(label, LV_OBJ_PART_MAIN, &lv_watch_font20);
             lv_label_set_align(label, LV_LABEL_ALIGN_CENTER);
-            lv_label_set_text(label, "0:0");
+            lv_label_set_text(label, "00:00");
             lv_obj_set_click(label, false);
             lv_obj_set_base_dir(label, LV_BIDI_DIR_LTR);
                        lv_obj_align(label, NULL, LV_ALIGN_IN_TOP_MID, 0, 0);
@@ -1381,6 +1396,15 @@ static lv_obj_t * mmi_vc_ui_create(lv_obj_t * activity_obj)
 
 void mmi_ui_msg_update_vc_call_incoming(void)
 {
+#ifdef __MMI_ZHSX_SUPPORT_HEALTH_SENSOR__
+       if(true == mmi_health_measure_state_is_ui_measure())
+       {
+               mmi_health_heart_rate_screen_clean();
+               mmi_health_spo2_screen_clean();
+               mmi_health_temperature_screen_clean();
+       }
+#endif
+       
        lv_obj_t * activity_obj = lv_watch_get_activity_obj(ACT_ID_VC_DIAL_BTN);
        if(NULL != activity_obj)
        {
index 8142291..1331303 100644 (file)
@@ -219,8 +219,8 @@ static lv_obj_t * mmi_vc_ring_off_content_create(lv_obj_t * par)
     if(content == NULL) {
         return(NULL);
     }
-
-    lv_obj_add_style(content, LV_OBJ_PART_MAIN, &lv_watch_cont_opa1);
+    lv_obj_set_style_local_radius(content, LV_CONT_PART_MAIN, LV_STATE_DEFAULT, 15);
+    //lv_obj_add_style(content, LV_OBJ_PART_MAIN, &lv_watch_cont_opa1);
     lv_obj_set_size(content, LV_HOR_RES - 40, 50);
        lv_obj_align(content, obj, LV_ALIGN_CENTER, 0, -10);
     lv_cont_set_layout(content, LV_LAYOUT_CENTER);
@@ -451,10 +451,12 @@ void mmi_vc_ring_off_screen(void)
     lv_vc_call_obj_ext_t * ext = mmi_vc_call_get_ext();
     if(NULL != ext) 
        {
-           if(ext->vc_ui == MMI_VC_UI_INCOMING || ext->vc_ui == MMI_VC_UI_DIALING) 
+           //if(ext->vc_ui == MMI_VC_UI_INCOMING || ext->vc_ui == MMI_VC_UI_DIALING) 
                {
-               if(ext->phone_status_label) {
-                   lv_label_set_text(ext->phone_status_label, "");
+               if(ext->phone_status_label)
+                       {
+                   //lv_label_set_text(ext->phone_status_label, "");
+                               lv_obj_set_hidden(ext->phone_status_label, true);
                }
            }
         mmi_vc_ring_off_content_create(mmi_vc_call_get_obj());
@@ -936,7 +938,11 @@ static void mmi_vc_ui_dialing(lv_obj_t * content)
        {
         lv_label_set_text(label, s_video_call_params.number);
     }
+#if USE_LV_WATCH_UI_240_280
+       lv_obj_align(label, img, LV_ALIGN_OUT_BOTTOM_MID, 0, 20);
+#else
        lv_obj_align(label, img, LV_ALIGN_OUT_BOTTOM_MID, 0, 10);
+#endif
     lv_obj_set_click(label, false);
 
        #if 0
@@ -1001,7 +1007,11 @@ static void mmi_vc_ui_incoming(lv_obj_t * content)
        {
         lv_label_set_text(label, s_video_call_params.number);
     }
+#if USE_LV_WATCH_UI_240_280
+       lv_obj_align(label, img, LV_ALIGN_OUT_BOTTOM_MID, 0, 20);
+#else
        lv_obj_align(label, img, LV_ALIGN_OUT_BOTTOM_MID, 0, 10);
+#endif
     lv_obj_set_click(label, false);
 
     // btn ring off
@@ -1061,7 +1071,11 @@ static void mmi_vc_ui_connecting(lv_obj_t * content)
        {
                lv_label_set_text(label, s_video_call_params.number);
        }
+#if USE_LV_WATCH_UI_240_280
+       lv_obj_align(label, img, LV_ALIGN_OUT_BOTTOM_MID, 0, 20);
+#else
        lv_obj_align(label, img, LV_ALIGN_OUT_BOTTOM_MID, 0, 10);
+#endif
        lv_obj_set_click(label, false);
 
     // btn ring off
@@ -1169,7 +1183,7 @@ static void mmi_vc_ui_connected(lv_obj_t * content)
             label = lv_label_create(canvas, NULL);
             lv_obj_add_style(label, LV_OBJ_PART_MAIN, &lv_watch_font20);
             lv_label_set_align(label, LV_LABEL_ALIGN_CENTER);
-            lv_label_set_text(label, "0:0");
+            lv_label_set_text(label, "00:00");
             lv_obj_set_click(label, false);
             lv_obj_set_base_dir(label, LV_BIDI_DIR_LTR);
                        lv_obj_align(label, NULL, LV_ALIGN_IN_TOP_MID, 0, 0);
@@ -1226,7 +1240,7 @@ static void mmi_vc_ui_connected(lv_obj_t * content)
             label = lv_label_create(canvas, NULL);
             lv_obj_add_style(label, LV_OBJ_PART_MAIN, &lv_watch_font20);
             lv_label_set_align(label, LV_LABEL_ALIGN_CENTER);
-            lv_label_set_text(label, "0:0");
+            lv_label_set_text(label, "00:00");
             lv_obj_set_click(label, false);
             lv_obj_set_base_dir(label, LV_BIDI_DIR_LTR);
                        lv_obj_align(label, NULL, LV_ALIGN_IN_TOP_MID, 0, 0);
@@ -1385,6 +1399,15 @@ static lv_obj_t * mmi_vc_ui_create(lv_obj_t * activity_obj)
 
 void mmi_ui_msg_update_vc_call_incoming(void)
 {
+#ifdef __MMI_ZHSX_SUPPORT_HEALTH_SENSOR__
+       if(true == mmi_health_measure_state_is_ui_measure())
+       {
+               mmi_health_heart_rate_screen_clean();
+               mmi_health_spo2_screen_clean();
+               mmi_health_temperature_screen_clean();
+       }
+#endif
+
        lv_obj_t * activity_obj = lv_watch_get_activity_obj(ACT_ID_VC_DIAL_BTN);
        if(NULL != activity_obj)
        {
index 2dcd5f3..717d25e 100644 (file)
@@ -124,7 +124,8 @@ static void voip_phone_left_slide_callback(lv_obj_t * obj)
 {
     printf("%s %d\n", __FUNCTION__, __LINE__);
         if((MMI_VIDEO_CALL_STATE_CALLING == s_video_call_params.state)
-                && (MODEM_VIDEO_CALL_TYPE_VIDEO == s_video_call_params.call_type)) {
+                && (MODEM_VIDEO_CALL_TYPE_VIDEO == s_video_call_params.call_type))
+               {
             voip_local_remote_switch_action(NULL, LV_EVENT_CLICKED);
         }
 }
@@ -212,8 +213,8 @@ static lv_obj_t * mmi_vc_ring_off_content_create(lv_obj_t * par)
     if(content == NULL) {
         return(NULL);
     }
-
-    lv_obj_add_style(content, LV_OBJ_PART_MAIN, &lv_watch_cont_opa1);
+    lv_obj_set_style_local_radius(content, LV_CONT_PART_MAIN, LV_STATE_DEFAULT, 15);
+    //lv_obj_add_style(content, LV_OBJ_PART_MAIN, &lv_watch_cont_opa1);
     lv_obj_set_size(content, LV_HOR_RES - 40, 50);
        lv_obj_align(content, obj, LV_ALIGN_CENTER, 0, -10);
     lv_cont_set_layout(content, LV_LAYOUT_CENTER);
@@ -444,10 +445,12 @@ void mmi_vc_ring_off_screen(void)
     lv_vc_call_obj_ext_t * ext = mmi_vc_call_get_ext();
     if(NULL != ext) 
        {
-           if(ext->vc_ui == MMI_VC_UI_INCOMING || ext->vc_ui == MMI_VC_UI_DIALING) 
+           //if(ext->vc_ui == MMI_VC_UI_INCOMING || ext->vc_ui == MMI_VC_UI_DIALING) 
                {
-               if(ext->phone_status_label) {
-                   lv_label_set_text(ext->phone_status_label, "");
+               if(ext->phone_status_label)
+                       {
+                   //lv_label_set_text(ext->phone_status_label, "");
+                               lv_obj_set_hidden(ext->phone_status_label, true);
                }
            }
         mmi_vc_ring_off_content_create(mmi_vc_call_get_obj());
@@ -930,7 +933,11 @@ static void mmi_vc_ui_dialing(lv_obj_t * content)
        {
         lv_label_set_text(label, s_video_call_params.number);
     }
+#if USE_LV_WATCH_UI_240_280
+       lv_obj_align(label, img, LV_ALIGN_OUT_BOTTOM_MID, 0, 20);
+#else
        lv_obj_align(label, img, LV_ALIGN_OUT_BOTTOM_MID, 0, 10);
+#endif
     lv_obj_set_click(label, false);
 
        #if 0
@@ -995,7 +1002,11 @@ static void mmi_vc_ui_incoming(lv_obj_t * content)
        {
         lv_label_set_text(label, s_video_call_params.number);
     }
+#if USE_LV_WATCH_UI_240_280
+       lv_obj_align(label, img, LV_ALIGN_OUT_BOTTOM_MID, 0, 20);
+#else
        lv_obj_align(label, img, LV_ALIGN_OUT_BOTTOM_MID, 0, 10);
+#endif
     lv_obj_set_click(label, false);
 
     // btn ring off
@@ -1055,7 +1066,11 @@ static void mmi_vc_ui_connecting(lv_obj_t * content)
        {
                lv_label_set_text(label, s_video_call_params.number);
        }
+#if USE_LV_WATCH_UI_240_280
+       lv_obj_align(label, img, LV_ALIGN_OUT_BOTTOM_MID, 0, 20);
+#else
        lv_obj_align(label, img, LV_ALIGN_OUT_BOTTOM_MID, 0, 10);
+#endif
        lv_obj_set_click(label, false);
 
     // btn ring off
@@ -1163,7 +1178,7 @@ static void mmi_vc_ui_connected(lv_obj_t * content)
             label = lv_label_create(canvas, NULL);
             lv_obj_add_style(label, LV_OBJ_PART_MAIN, &lv_watch_font20);
             lv_label_set_align(label, LV_LABEL_ALIGN_CENTER);
-            lv_label_set_text(label, "0:0");
+            lv_label_set_text(label, "00:00");
             lv_obj_set_click(label, false);
             lv_obj_set_base_dir(label, LV_BIDI_DIR_LTR);
                        lv_obj_align(label, NULL, LV_ALIGN_IN_TOP_MID, 0, 0);
@@ -1220,7 +1235,7 @@ static void mmi_vc_ui_connected(lv_obj_t * content)
             label = lv_label_create(canvas, NULL);
             lv_obj_add_style(label, LV_OBJ_PART_MAIN, &lv_watch_font20);
             lv_label_set_align(label, LV_LABEL_ALIGN_CENTER);
-            lv_label_set_text(label, "0:0");
+            lv_label_set_text(label, "00:00");
             lv_obj_set_click(label, false);
             lv_obj_set_base_dir(label, LV_BIDI_DIR_LTR);
                        lv_obj_align(label, NULL, LV_ALIGN_IN_TOP_MID, 0, 0);
@@ -1379,6 +1394,15 @@ static lv_obj_t * mmi_vc_ui_create(lv_obj_t * activity_obj)
 
 void mmi_ui_msg_update_vc_call_incoming(void)
 {
+#ifdef __MMI_ZHSX_SUPPORT_HEALTH_SENSOR__
+       if(true == mmi_health_measure_state_is_ui_measure())
+       {
+               mmi_health_heart_rate_screen_clean();
+               mmi_health_spo2_screen_clean();
+               mmi_health_temperature_screen_clean();
+       }
+#endif
+
        lv_obj_t * activity_obj = lv_watch_get_activity_obj(ACT_ID_VC_DIAL_BTN);
        if(NULL != activity_obj)
        {
index aff4fbc..d924e5a 100644 (file)
@@ -400,7 +400,9 @@ bool wechat_msg_receive_from_server(char * data_buff, int data_buff_len, nv_wech
 
        // ui
        if(false == mmi_active_screen_is_prohibit_interrupted() 
+               #ifdef __MMI_ZHSX_SUPPORT_HEALTH_SENSOR__
                && false == mmi_health_measure_state_is_ui_measure()
+               #endif
 //             && false == wechat_msg_voice_is_playing() 
                && false == wechat_msg_voice_is_recording()
                && false == wechat_msg_item_is_sending()
index 33416a7..1a29d14 100644 (file)
@@ -400,7 +400,9 @@ bool wechat_msg_receive_from_server(char * data_buff, int data_buff_len, nv_wech
 
        // ui
        if(false == mmi_active_screen_is_prohibit_interrupted() 
+               #ifdef __MMI_ZHSX_SUPPORT_HEALTH_SENSOR__
                && false == mmi_health_measure_state_is_ui_measure()
+               #endif
 //             && false == wechat_msg_voice_is_playing() 
                && false == wechat_msg_voice_is_recording()
                && false == wechat_msg_item_is_sending()
index 161e8ff..3ea429c 100644 (file)
@@ -103,7 +103,11 @@ static lv_obj_t * setting_about_create(lv_obj_t * activity_obj)
        snprintf(info_str, 96, "%s:%s\n%s:%s", (char *)lv_lang_get_text(WATCH_TEXT_ID_MODE), app_adaptor_get_model_id(), 
                                                (char *)lv_lang_get_text(WATCH_TEXT_ID_VERSION_NUM), app_adaptor_get_version());
        lv_label_set_text(info_label, info_str);
+       #ifdef USE_LV_WATCH_UI_240_240_CIRCLE
+       lv_obj_align(info_label, content, LV_ALIGN_IN_TOP_MID, 0, 50);
+       #else
        lv_obj_align(info_label, content, LV_ALIGN_IN_TOP_MID, 0, 80);
+       #endif
     lv_obj_set_click(info_label, false);
 
 #if 0
@@ -224,6 +228,10 @@ static void setting_about_click_event_cb(lv_obj_t * obj, lv_event_t e)
         if(7 == about_ext->click_count) {
             about_ext->click_count = 0;
             factorymode_main_create(NULL);
+
+               #ifdef __MMI_ZHSX_SUPPORT_HEALTH_SENSOR__
+                       mmi_health_measure_factory_mode_clean();
+               #endif
         }
     }
 }
index 18db76f..abcad02 100644 (file)
@@ -226,11 +226,13 @@ static void mmi_protocol_watch_timed_mission_timer_cb(uint32_t para)
                s_watch_timed_weather_time_stamp = cur_time_stamp;
        }
 
+#ifdef __MMI_ZHSX_SUPPORT_HEALTH_SENSOR__
        //health measure
        mmi_health_measure_heart_timed_action(false, cur_time_stamp);
        mmi_health_measure_temperature_timed_action(false, cur_time_stamp);
        mmi_health_measure_blood_timed_action(false, cur_time_stamp);
        mmi_health_measure_spo2_timed_action(false, cur_time_stamp);
+#endif
 
        uos_timer_stop(s_watch_timed_mission_timer_id);
        uos_timer_start(s_watch_timed_mission_timer_id, MS_TO_TICKS(1000 * 20), 0, mmi_protocol_watch_timed_mission_timer_cb, NULL);
@@ -252,11 +254,13 @@ void mmi_protocol_watch_timed_mission_action(void)
                mmi_protocol_action_get_weather();
                s_watch_timed_weather_time_stamp = cur_time_stamp;
 
+       #ifdef __MMI_ZHSX_SUPPORT_HEALTH_SENSOR__
                mmi_health_measure_timed_info_nv_read();
                mmi_health_measure_heart_timed_action(true, cur_time_stamp);
                mmi_health_measure_temperature_timed_action(true, cur_time_stamp);
                mmi_health_measure_blood_timed_action(true, cur_time_stamp);
                mmi_health_measure_spo2_timed_action(true, cur_time_stamp);
+       #endif
                
                uos_timer_create(&s_watch_timed_mission_timer_id);
                uos_timer_start(s_watch_timed_mission_timer_id, MS_TO_TICKS(1000 * 20), 0, mmi_protocol_watch_timed_mission_timer_cb, NULL);
@@ -341,7 +345,11 @@ bool mmi_protocol_action_send_temperature(float temp_value)
        if(false == mmi_protocol_check_state_before_send_action())
                return false;
        
+#ifdef __MMI_ZHSX_SUPPORT_HEALTH_SENSOR__
        return mmi_protocol_fzd_action_send_temperature(temp_value);
+#else
+       return false;
+#endif
 }
 
 bool mmi_protocol_action_send_heart(uint16_t heart_value)
@@ -349,7 +357,11 @@ bool mmi_protocol_action_send_heart(uint16_t heart_value)
        if(false == mmi_protocol_check_state_before_send_action())
                return false;
        
+#ifdef __MMI_ZHSX_SUPPORT_HEALTH_SENSOR__
        return mmi_protocol_fzd_action_send_heart(heart_value);
+#else
+       return false;
+#endif
 }
 
 bool mmi_protocol_action_send_blood(uint16_t blood_high_value, uint16_t blood_low_value)
@@ -357,7 +369,11 @@ bool mmi_protocol_action_send_blood(uint16_t blood_high_value, uint16_t blood_lo
        if(false == mmi_protocol_check_state_before_send_action())
                return false;
        
+#ifdef __MMI_ZHSX_SUPPORT_HEALTH_SENSOR__
        return mmi_protocol_fzd_action_send_blood(blood_high_value, blood_low_value);
+#else
+       return false;
+#endif
 }
 
 bool mmi_protocol_action_send_spo2(uint16_t spo2_value)
@@ -365,7 +381,11 @@ bool mmi_protocol_action_send_spo2(uint16_t spo2_value)
        if(false == mmi_protocol_check_state_before_send_action())
                return false;
        
+#ifdef __MMI_ZHSX_SUPPORT_HEALTH_SENSOR__
        return mmi_protocol_fzd_action_send_spo2(spo2_value);
+#else
+       return false;
+#endif
 }
 
 bool mmi_protocol_action_send_talk(char * data_buff, int data_buff_len)
index 7490865..06069ff 100644 (file)
@@ -924,6 +924,7 @@ bool mmi_protocol_fzd_parse_SERVER_SET_REMIND(unsigned char * next_buff, unsigne
        return result;
 }
 
+#ifdef __MMI_ZHSX_SUPPORT_HEALTH_SENSOR__
 bool mmi_protocol_fzd_action_send_temperature(float temp_value)
 {
        bool result = false;
@@ -1115,6 +1116,7 @@ bool mmi_protocol_fzd_parse_SERVER_SET_SPO2_INTERVAL(unsigned char * next_buff,
 
        return result;
 }
+#endif
 
 
 #define ENCRYPT_EXT_MIN  100
index 002eb35..978329c 100644 (file)
@@ -110,6 +110,7 @@ typedef enum
        MMI_FZD_SERVER_SET_CALL,
        MMI_FZD_SERVER_SET_REMIND,
        
+#ifdef __MMI_ZHSX_SUPPORT_HEALTH_SENSOR__
        MMI_FZD_SERVER_SET_HEART_INTERVAL, // 16
        MMI_FZD_ACTION_SEND_HEART,
        MMI_FZD_SERVER_SET_TEMPERATURE_INTERVAL,
@@ -118,6 +119,7 @@ typedef enum
        MMI_FZD_ACTION_SEND_BLOOD,
        MMI_FZD_SERVER_SET_SPO2_INTERVAL,
        MMI_FZD_ACTION_SEND_SPO2,
+#endif
 
 #ifdef __MMI_WECHAT_SUPPORT__
        MMI_FZD_ACTION_TALK, // wechat
@@ -226,21 +228,16 @@ bool mmi_protocol_fzd_parse_SERVER_SET_CALL(unsigned char * next_buff, unsigned
 
 bool mmi_protocol_fzd_parse_SERVER_SET_REMIND(unsigned char * next_buff, unsigned int next_buff_len);
 
+#ifdef __MMI_ZHSX_SUPPORT_HEALTH_SENSOR__
 bool mmi_protocol_fzd_parse_SERVER_SET_HEART_INTERVAL(unsigned char * next_buff, unsigned int next_buff_len);
-
 bool mmi_protocol_fzd_parse_SERVER_SET_TEMPERATURE_INTERVAL(unsigned char * next_buff, unsigned int next_buff_len);
-
 bool mmi_protocol_fzd_parse_SERVER_SET_BLOOD_INTERVAL(unsigned char * next_buff, unsigned int next_buff_len);
-
 bool mmi_protocol_fzd_parse_SERVER_SET_SPO2_INTERVAL(unsigned char * next_buff, unsigned int next_buff_len);
-
 bool mmi_protocol_fzd_action_send_temperature(float temp_value);
-
 bool mmi_protocol_fzd_action_send_heart(uint16_t heart_value);
-
 bool mmi_protocol_fzd_action_send_blood(uint16_t blood_high_value, uint16_t blood_low_value);
-
 bool mmi_protocol_fzd_action_send_spo2(uint16_t spo2_value);
+#endif
 
 #ifdef __MMI_WECHAT_SUPPORT__
 bool mmi_protocol_fzd_ACTION_TALK(char * data_buff, int data_buff_len);
index d2ce593..d01e2d9 100644 (file)
@@ -34,6 +34,7 @@ static unsigned char * mmi_protocol_fzd_action_string_get(MMI_PROTOCOL_FZD_ACTIO
                        {MMI_FZD_SERVER_SET_CALL, "CALL"},      
                        {MMI_FZD_SERVER_SET_REMIND, "REMIND"},  
                        
+               #ifdef __MMI_ZHSX_SUPPORT_HEALTH_SENSOR__
                {MMI_FZD_SERVER_SET_HEART_INTERVAL, "hrtstart"},   
                        {MMI_FZD_ACTION_SEND_HEART, "heart"},   
                        {MMI_FZD_SERVER_SET_TEMPERATURE_INTERVAL, "wdstart"},
@@ -42,6 +43,7 @@ static unsigned char * mmi_protocol_fzd_action_string_get(MMI_PROTOCOL_FZD_ACTIO
                        {MMI_FZD_ACTION_SEND_BLOOD, "blood"},
                        {MMI_FZD_SERVER_SET_SPO2_INTERVAL, "oxstart"},
                        {MMI_FZD_ACTION_SEND_SPO2, "oxygen"},
+               #endif
                        
                #ifdef __MMI_WECHAT_SUPPORT__
                        {MMI_FZD_ACTION_TALK, "TK"},
@@ -196,6 +198,7 @@ static bool mmi_protocol_fzd_content_parse(unsigned char * content_ptr, unsigned
                        mmi_protocol_fzd_parse_SERVER_SET_REMIND(next_buff, next_buff_len);
                        break;
                        
+       #ifdef __MMI_ZHSX_SUPPORT_HEALTH_SENSOR__
                case MMI_FZD_SERVER_SET_HEART_INTERVAL:
                        mmi_protocol_fzd_parse_SERVER_SET_HEART_INTERVAL(next_buff, next_buff_len);
                        break;
@@ -223,6 +226,7 @@ static bool mmi_protocol_fzd_content_parse(unsigned char * content_ptr, unsigned
                        
                case MMI_FZD_ACTION_SEND_SPO2:
                        break;
+       #endif
                        
        #ifdef __MMI_WECHAT_SUPPORT__
                case MMI_FZD_ACTION_TALK: