From: CCC <2393524978@qq.com> Date: Wed, 15 Nov 2023 08:04:39 +0000 (+0800) Subject: gengxin X-Git-Url: http://git.snicker.com.cn/?a=commitdiff_plain;h=8aafc51a86380c2dc8edcf290d79b9a4db3764d7;p=mirrors%2FASR3603_Z5.git gengxin --- diff --git a/2.sdk/sdk/gui/lv_watch/lv_apps/factory_mode/factory_mode_autotest.c b/2.sdk/sdk/gui/lv_watch/lv_apps/factory_mode/factory_mode_autotest.c index aba371cf..40ed9b74 100644 --- a/2.sdk/sdk/gui/lv_watch/lv_apps/factory_mode/factory_mode_autotest.c +++ b/2.sdk/sdk/gui/lv_watch/lv_apps/factory_mode/factory_mode_autotest.c @@ -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 }, diff --git a/2.sdk/sdk/gui/lv_watch/lv_apps/factory_mode/factory_mode_main.c b/2.sdk/sdk/gui/lv_watch/lv_apps/factory_mode/factory_mode_main.c index f12eec76..1efa2f09 100644 --- a/2.sdk/sdk/gui/lv_watch/lv_apps/factory_mode/factory_mode_main.c +++ b/2.sdk/sdk/gui/lv_watch/lv_apps/factory_mode/factory_mode_main.c @@ -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 }, diff --git a/2.sdk/sdk/gui/lv_watch/lv_apps/factory_mode/factory_mode_test.c b/2.sdk/sdk/gui/lv_watch/lv_apps/factory_mode/factory_mode_test.c index fb20aabb..b7398b5d 100644 --- a/2.sdk/sdk/gui/lv_watch/lv_apps/factory_mode/factory_mode_test.c +++ b/2.sdk/sdk/gui/lv_watch/lv_apps/factory_mode/factory_mode_test.c @@ -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) diff --git a/2.sdk/sdk/gui/lv_watch/lv_apps/mmi_video_call/mmi_video_call_fzd.c b/2.sdk/sdk/gui/lv_watch/lv_apps/mmi_video_call/mmi_video_call_fzd.c index 0dbfc3b2..cdee946a 100644 --- a/2.sdk/sdk/gui/lv_watch/lv_apps/mmi_video_call/mmi_video_call_fzd.c +++ b/2.sdk/sdk/gui/lv_watch/lv_apps/mmi_video_call/mmi_video_call_fzd.c @@ -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) { diff --git a/2.sdk/sdk/gui/lv_watch/lv_apps/mmi_video_call/mmi_video_call_tongxin.c b/2.sdk/sdk/gui/lv_watch/lv_apps/mmi_video_call/mmi_video_call_tongxin.c index 81422910..13313033 100644 --- a/2.sdk/sdk/gui/lv_watch/lv_apps/mmi_video_call/mmi_video_call_tongxin.c +++ b/2.sdk/sdk/gui/lv_watch/lv_apps/mmi_video_call/mmi_video_call_tongxin.c @@ -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) { diff --git a/2.sdk/sdk/gui/lv_watch/lv_apps/mmi_video_call/mmi_video_call_wulian.c b/2.sdk/sdk/gui/lv_watch/lv_apps/mmi_video_call/mmi_video_call_wulian.c index 2dcd5f33..717d25ee 100644 --- a/2.sdk/sdk/gui/lv_watch/lv_apps/mmi_video_call/mmi_video_call_wulian.c +++ b/2.sdk/sdk/gui/lv_watch/lv_apps/mmi_video_call/mmi_video_call_wulian.c @@ -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) { diff --git a/2.sdk/sdk/gui/lv_watch/lv_apps/mmi_wechat/wechat.c b/2.sdk/sdk/gui/lv_watch/lv_apps/mmi_wechat/wechat.c index aff4fbc1..d924e5ad 100644 --- a/2.sdk/sdk/gui/lv_watch/lv_apps/mmi_wechat/wechat.c +++ b/2.sdk/sdk/gui/lv_watch/lv_apps/mmi_wechat/wechat.c @@ -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() diff --git a/2.sdk/sdk/gui/lv_watch/lv_apps/mmi_wechat/wechat_circle.c b/2.sdk/sdk/gui/lv_watch/lv_apps/mmi_wechat/wechat_circle.c index 33416a71..1a29d14b 100644 --- a/2.sdk/sdk/gui/lv_watch/lv_apps/mmi_wechat/wechat_circle.c +++ b/2.sdk/sdk/gui/lv_watch/lv_apps/mmi_wechat/wechat_circle.c @@ -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() diff --git a/2.sdk/sdk/gui/lv_watch/lv_apps/setting/setting_about.c b/2.sdk/sdk/gui/lv_watch/lv_apps/setting/setting_about.c index 161e8ff8..3ea429c3 100644 --- a/2.sdk/sdk/gui/lv_watch/lv_apps/setting/setting_about.c +++ b/2.sdk/sdk/gui/lv_watch/lv_apps/setting/setting_about.c @@ -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 } } } diff --git a/2.sdk/sdk/gui/lv_watch/mmi_protocol/mmi_protocol_api.c b/2.sdk/sdk/gui/lv_watch/mmi_protocol/mmi_protocol_api.c index 18db76f4..abcad02c 100644 --- a/2.sdk/sdk/gui/lv_watch/mmi_protocol/mmi_protocol_api.c +++ b/2.sdk/sdk/gui/lv_watch/mmi_protocol/mmi_protocol_api.c @@ -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) diff --git a/2.sdk/sdk/gui/lv_watch/mmi_protocol/mmi_protocol_fzd.c b/2.sdk/sdk/gui/lv_watch/mmi_protocol/mmi_protocol_fzd.c index 74908658..06069ffe 100644 --- a/2.sdk/sdk/gui/lv_watch/mmi_protocol/mmi_protocol_fzd.c +++ b/2.sdk/sdk/gui/lv_watch/mmi_protocol/mmi_protocol_fzd.c @@ -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 diff --git a/2.sdk/sdk/gui/lv_watch/mmi_protocol/mmi_protocol_fzd.h b/2.sdk/sdk/gui/lv_watch/mmi_protocol/mmi_protocol_fzd.h index 002eb358..978329c0 100644 --- a/2.sdk/sdk/gui/lv_watch/mmi_protocol/mmi_protocol_fzd.h +++ b/2.sdk/sdk/gui/lv_watch/mmi_protocol/mmi_protocol_fzd.h @@ -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); diff --git a/2.sdk/sdk/gui/lv_watch/mmi_protocol/mmi_protocol_fzd_content.c b/2.sdk/sdk/gui/lv_watch/mmi_protocol/mmi_protocol_fzd_content.c index d2ce5936..d01e2d94 100644 --- a/2.sdk/sdk/gui/lv_watch/mmi_protocol/mmi_protocol_fzd_content.c +++ b/2.sdk/sdk/gui/lv_watch/mmi_protocol/mmi_protocol_fzd_content.c @@ -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: