From: @CHENG <2393524978@qq.com> Date: Sat, 6 Jan 2024 06:35:43 +0000 (+0800) Subject: gengxin X-Git-Url: http://git.snicker.com.cn/Users/apple/Desktop/static/gitweb.css?a=commitdiff_plain;h=06b33fe950c72af0eb885dd839cef3f06265e776;p=mirrors%2FASR3603_Z5.git gengxin --- diff --git a/2.sdk/sdk/gui/lv_watch/framework/message/mmi_msg_zhsx.c b/2.sdk/sdk/gui/lv_watch/framework/message/mmi_msg_zhsx.c index 746aa267..4d90969b 100644 --- a/2.sdk/sdk/gui/lv_watch/framework/message/mmi_msg_zhsx.c +++ b/2.sdk/sdk/gui/lv_watch/framework/message/mmi_msg_zhsx.c @@ -185,6 +185,35 @@ void mmi_ui_msg_action_ai_talk_incoming(void) } #endif +#ifdef __MMI_CUSTOM_HENGAI_HEALTH__ +void mmi_ui_msg_action_hengai_bp_calibrate_result(bool state) +{ + printf("[@CHENG_DEBUG][%s][%d]: \n", __FUNCTION__, __LINE__); + + mmi_msg_hengai_bp_calibrate_result_t * msg_info = (mmi_msg_hengai_bp_calibrate_result_t *)Hal_Mem_Alloc(sizeof(mmi_msg_hengai_bp_calibrate_result_t)); + + memset(msg_info, 0x0, sizeof(mmi_msg_hengai_bp_calibrate_result_t)); + msg_info->header.MsgId = MMI_MSG_HENGAI_BP_CALIBRATE_RESULT; + msg_info->state = state; + + Hal_Send_Message((TASK_ID)gui_task_id, (void *)msg_info); +} + +void mmi_ui_msg_action_hengai_bp_measure_result(bool state, uint16_t bp_value_high, uint16_t bp_value_low) +{ + printf("[@CHENG_DEBUG][%s][%d]: \n", __FUNCTION__, __LINE__); + + mmi_msg_hengai_bp_measure_result_t * msg_info = (mmi_msg_hengai_bp_measure_result_t *)Hal_Mem_Alloc(sizeof(mmi_msg_hengai_bp_measure_result_t)); + + memset(msg_info, 0x0, sizeof(mmi_msg_hengai_bp_measure_result_t)); + msg_info->header.MsgId = MMI_MSG_HENGAI_BP_MEASURE_RESULT; + msg_info->state = state; + msg_info->bp_value_high = bp_value_high; + msg_info->bp_value_low = bp_value_low; + + Hal_Send_Message((TASK_ID)gui_task_id, (void *)msg_info); +} +#endif #if 0 diff --git a/2.sdk/sdk/gui/lv_watch/framework/message/mmi_msg_zhsx.h b/2.sdk/sdk/gui/lv_watch/framework/message/mmi_msg_zhsx.h index ec733cf8..6ead1fd5 100644 --- a/2.sdk/sdk/gui/lv_watch/framework/message/mmi_msg_zhsx.h +++ b/2.sdk/sdk/gui/lv_watch/framework/message/mmi_msg_zhsx.h @@ -83,6 +83,10 @@ void mmi_ui_msg_action_heng_ai_warning(void); #ifdef __MMI_CUSTOM_BEI_KE_RUI_SHENG__ void mmi_ui_msg_action_ai_talk_incoming(void); #endif +#ifdef __MMI_CUSTOM_HENGAI_HEALTH__ +void mmi_ui_msg_action_hengai_bp_calibrate_result(bool state); +void mmi_ui_msg_action_hengai_bp_measure_result(bool state, uint16_t bp_value_high, uint16_t bp_value_low); +#endif void mmi_ui_falldown(void); diff --git a/2.sdk/sdk/gui/lv_watch/framework/message/watch_msg_handle.c b/2.sdk/sdk/gui/lv_watch/framework/message/watch_msg_handle.c index 78204520..947ea7de 100644 --- a/2.sdk/sdk/gui/lv_watch/framework/message/watch_msg_handle.c +++ b/2.sdk/sdk/gui/lv_watch/framework/message/watch_msg_handle.c @@ -448,6 +448,17 @@ void watch_ui_message_handle(uint16_t msgid, void * msg) mmi_ai_talk_receive_update_ui(); break; #endif + #ifdef __MMI_CUSTOM_HENGAI_HEALTH__ + case MMI_MSG_HENGAI_BP_CALIBRATE_RESULT: + mmi_ui_msg_update_hengai_bp_calibrate_result(((mmi_msg_hengai_bp_calibrate_result_t *)msg)->state); + break; + case MMI_MSG_HENGAI_BP_MEASURE_RESULT: + bool state = ((mmi_msg_hengai_bp_measure_result_t *)msg)->state; + uint16_t bp_value_high = ((mmi_msg_hengai_bp_measure_result_t *)msg)->bp_value_high; + uint16_t bp_value_low = ((mmi_msg_hengai_bp_measure_result_t *)msg)->bp_value_low; + mmi_ui_msg_update_hengai_bp_measure_result(state, bp_value_high, bp_value_low); + break; + #endif #endif diff --git a/2.sdk/sdk/gui/lv_watch/framework/message/watch_msg_handle.h b/2.sdk/sdk/gui/lv_watch/framework/message/watch_msg_handle.h index 0e47f5a2..0958d453 100644 --- a/2.sdk/sdk/gui/lv_watch/framework/message/watch_msg_handle.h +++ b/2.sdk/sdk/gui/lv_watch/framework/message/watch_msg_handle.h @@ -132,6 +132,10 @@ enum #ifdef __MMI_CUSTOM_BEI_KE_RUI_SHENG__ MMI_MSG_AI_TALK_INCOMING, #endif +#ifdef __MMI_CUSTOM_HENGAI_HEALTH__ + MMI_MSG_HENGAI_BP_CALIBRATE_RESULT, + MMI_MSG_HENGAI_BP_MEASURE_RESULT, +#endif #endif @@ -570,6 +574,22 @@ typedef struct } mmi_msg_do_not_disturb_t; #endif +#ifdef __MMI_CUSTOM_HENGAI_HEALTH__ +typedef struct +{ + UI_Inter_Msg_Header_t header; + bool state; +} mmi_msg_hengai_bp_calibrate_result_t; + +typedef struct +{ + UI_Inter_Msg_Header_t header; + bool state; + uint16_t bp_value_high; + uint16_t bp_value_low; +} mmi_msg_hengai_bp_measure_result_t; +#endif + #endif diff --git a/2.sdk/sdk/gui/lv_watch/lv_apps/custom_function/heng_ai_blood_pressure.h b/2.sdk/sdk/gui/lv_watch/lv_apps/custom_function/heng_ai_blood_pressure.h index 8dd20c0c..26880c83 100644 --- a/2.sdk/sdk/gui/lv_watch/lv_apps/custom_function/heng_ai_blood_pressure.h +++ b/2.sdk/sdk/gui/lv_watch/lv_apps/custom_function/heng_ai_blood_pressure.h @@ -20,12 +20,14 @@ extern "C" { #define MMI_HENGAI_BP_TAB_COUNT (3) -#define MMI_BP_MEASURE_TOTAL_COUNT (60) // times +#define MMI_BP_MEASURE_TOTAL_COUNT (63) // (60) // times #define MMI_BP_WAIT_RESULT_TIMEOUT (1000 * 10) // ms #define MMI_HENGAI_BP_RAW_DATA_SAMPLE_RATE (81) +#define MMI_HENGAI_BP_RAW_DATA_LEN (4860) // base on sample rate + #define MMI_HENGAI_BP_HIGH_VALUE_MAX (200) #define MMI_HENGAI_BP_HIGH_VALUE_MIN (100) #define MMI_HENGAI_BP_LOW_VALUE_MAX (120) @@ -83,8 +85,8 @@ typedef struct bool mmi_hengai_bp_measuring_flag_get(void); -void mmi_hengai_bp_measure_update_result(bool state, uint16_t bp_value_high, uint16_t bp_value_low, char * description); -void mmi_hengai_bp_calibrate_update_result(bool is_success); +void mmi_ui_msg_update_hengai_bp_measure_result(bool state, uint16_t bp_value_high, uint16_t bp_value_low); +void mmi_ui_msg_update_hengai_bp_calibrate_result(bool is_success); diff --git a/2.sdk/sdk/gui/lv_watch/lv_apps/custom_function/heng_ai_http_protocol.h b/2.sdk/sdk/gui/lv_watch/lv_apps/custom_function/heng_ai_http_protocol.h index 4e3b9ee5..78c930eb 100644 --- a/2.sdk/sdk/gui/lv_watch/lv_apps/custom_function/heng_ai_http_protocol.h +++ b/2.sdk/sdk/gui/lv_watch/lv_apps/custom_function/heng_ai_http_protocol.h @@ -18,6 +18,15 @@ extern "C" { #ifdef __MMI_CUSTOM_HENGAI_HEALTH__ +#define __HENGAI_HEALTH_DEBUG__ +#ifdef __HENGAI_HEALTH_DEBUG__ +#define HENGAI_HEALTH_DEBUG_PRINTF(fmt, ...) printf(fmt, ##__VA_ARGS__) +#else +#define HENGAI_HEALTH_DEBUG_PRINTF(fmt, ...) +#endif + + + // #include "../../../../product/craneg_modem/cust/fit/inc/sdknet.h" // ½Ó¿Úǰ׺£º diff --git a/2.sdk/sdk/gui/lv_watch/lv_apps/launcher/launcher.c b/2.sdk/sdk/gui/lv_watch/lv_apps/launcher/launcher.c index 2db0928a..a743ff63 100644 --- a/2.sdk/sdk/gui/lv_watch/lv_apps/launcher/launcher.c +++ b/2.sdk/sdk/gui/lv_watch/lv_apps/launcher/launcher.c @@ -534,9 +534,13 @@ static void launcher_tileview_leds_update(lv_obj_t * tileview) lv_obj_set_hidden(ext->leds_content, false); } - #ifdef __MMI_MAIN_MENU_SWITCH_MENU__ - //ext->show_leds_en = 0; - lv_obj_set_hidden(ext->leds_content, true); + #ifdef __MMI_ZHSX_SUPPORT__ + MMI_MAIN_MENU_STYLE_E style_value = mmi_main_menu_style_get(); + if((MMI_MAIN_MENU_STYLE_ONE_PAGE == style_value) || (MMI_MAIN_MENU_STYLE_LIST == style_value)) + { + //ext->show_leds_en = 0; + lv_obj_set_hidden(ext->leds_content, true); + } #endif } for(uint8_t i = 0; i < tab_cnt; i++) {