gengxin
author@CHENG <2393524978@qq.com>
Sat, 6 Jan 2024 06:35:43 +0000 (14:35 +0800)
committer@CHENG <2393524978@qq.com>
Sat, 6 Jan 2024 06:35:43 +0000 (14:35 +0800)
2.sdk/sdk/gui/lv_watch/framework/message/mmi_msg_zhsx.c
2.sdk/sdk/gui/lv_watch/framework/message/mmi_msg_zhsx.h
2.sdk/sdk/gui/lv_watch/framework/message/watch_msg_handle.c
2.sdk/sdk/gui/lv_watch/framework/message/watch_msg_handle.h
2.sdk/sdk/gui/lv_watch/lv_apps/custom_function/heng_ai_blood_pressure.h
2.sdk/sdk/gui/lv_watch/lv_apps/custom_function/heng_ai_http_protocol.h
2.sdk/sdk/gui/lv_watch/lv_apps/launcher/launcher.c

index 746aa26..4d90969 100644 (file)
@@ -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
index ec733cf..6ead1fd 100644 (file)
@@ -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);
 
 
index 7820452..947ea7d 100644 (file)
@@ -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
index 0e47f5a..0958d45 100644 (file)
@@ -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
 
index 8dd20c0..26880c8 100644 (file)
@@ -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);
 
 
 
index 4e3b9ee..78c930e 100644 (file)
@@ -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"
 
 // ½Ó¿Úǰ׺£º
index 2db0928..a743ff6 100644 (file)
@@ -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++) {