From: CCC <2393524978@qq.com> Date: Mon, 18 Dec 2023 06:35:50 +0000 (+0800) Subject: gengxin X-Git-Url: http://git.snicker.com.cn/css/static/gitweb.css?a=commitdiff_plain;h=432f6e231b76815d768a396d298383028deb97f9;p=mirrors%2FASR3603_Z5.git gengxin --- diff --git a/2.sdk/sdk/gui/lv_watch/lv_apps/custom_function/heng_ai_blood_pressure.c b/2.sdk/sdk/gui/lv_watch/lv_apps/custom_function/heng_ai_blood_pressure.c index a146aa86..494f1b75 100644 --- a/2.sdk/sdk/gui/lv_watch/lv_apps/custom_function/heng_ai_blood_pressure.c +++ b/2.sdk/sdk/gui/lv_watch/lv_apps/custom_function/heng_ai_blood_pressure.c @@ -290,6 +290,8 @@ static void mmi_heng_ai_blood_pressure_screen_prepare_destory(lv_obj_t * activit { HEALTH_MEASURE_DEBUG_PRINTF("[@CHENG_DEBUG][%s][%d]: \n", __FUNCTION__, __LINE__); + mmi_hengai_http_tcp_disconnect_msg(NULL); + watch_set_suspend_enable(true, ACT_ID_HENG_AI_BP, 0); lv_watch_png_cache_all_free(); @@ -1765,6 +1767,8 @@ void mmi_heng_ai_blood_pressure_create_event_cb(lv_obj_t * btn, lv_event_t e) (void)btn; if(LV_EVENT_CLICKED == e) { + mmi_hengai_http_tcp_connect_msg(NULL); + lv_obj_t * obj = mmi_heng_ai_blood_pressure_screen_create(NULL); LV_ASSERT_MEM(obj); } diff --git a/2.sdk/sdk/gui/lv_watch/lv_apps/custom_function/heng_ai_http_protocol.c b/2.sdk/sdk/gui/lv_watch/lv_apps/custom_function/heng_ai_http_protocol.c index 8ee44250..0f70f159 100644 --- a/2.sdk/sdk/gui/lv_watch/lv_apps/custom_function/heng_ai_http_protocol.c +++ b/2.sdk/sdk/gui/lv_watch/lv_apps/custom_function/heng_ai_http_protocol.c @@ -9,7 +9,7 @@ #define MMI_HENGAI_HTTP_S_TASK_PRIORITY 221 #define MMI_HENGAI_HTTP_R_TASK_STACK_SIZE (8 * 1024) -#define MMI_HENGAI_HTTP_S_TASK_STACK_SIZE (8 * 1024) +#define MMI_HENGAI_HTTP_S_TASK_STACK_SIZE (4 * 1024) static TASK_HANDLE * s_hengai_http_r_task_id = NULL; static TASK_HANDLE * s_hengai_http_s_task_id = NULL; @@ -103,7 +103,7 @@ static void mmi_hengai_http_socket_callback(int sfd, int event, unsigned int len case NETCONN_EVT_CLOSE_WAIT: ValSetDataTransFlag(1); printf("dt socket error or close event = %02x\n",event); - printf("LH reconnect\n"); + //printf("LH reconnect\n"); //if(Hal_Get_Message_Count((TASK_ID)modem_tcp_task_id) < UOS_TCP_TASK_MSG_QSIZE) //{ // send_task_msg_tcp_reconnect(NULL); @@ -246,12 +246,11 @@ void mmi_hengai_http_tcp_read_data(void *param) } Hal_Mem_Set(recv_buf , 0x00, HENGAI_HTTP_RECEIVE_BUFF_LEN); recv_ret = ValRecvEx(data_info->socket_fd, HENGAI_HTTP_SOCKET_REV_TIMEOUT, recv_buf, HENGAI_HTTP_RECEIVE_BUFF_LEN, &recv_len); - printf("[@CHENG_DEBUG][%s][%d]: recv_ret=%d,recv_len=%d,recv_buf=0x%x\n", __FUNCTION__, __LINE__, recv_ret, recv_len, recv_buf); - printf("[@CHENG_DEBUG][%d]: str=%s\n", __LINE__, recv_buf); + printf("[@CHENG_DEBUG][%s][%d]: ret=%d,len=%d,buf=0x%x\n", __FUNCTION__, __LINE__, recv_ret, recv_len, recv_buf); + //printf("[@CHENG_DEBUG][%d]: str=%s\n", __LINE__, recv_buf); if(0 <= recv_ret) { mmi_hengai_http_data_receive(recv_buf, recv_len); -// mmi_protocol_receive_data_process(recv_str, recv_len); } if(NULL != recv_buf) @@ -442,6 +441,34 @@ void mm_hengai_http_task_init(void) mm_hengai_http_s_task_init(); } + + +#include "hal/dm/cJSON.h" + +void mmi_hengai_http_data_receive(char * recv_buf, int recv_len) +{ + cJSON * json_root = NULL; + + json_root = cJSON_Parse(recv_buf); + if(NULL != json_root) + { + printf("[@CHENG_DEBUG][%s][%d]: json file\n", __FUNCTION__, __LINE__); + + + } + else + { + printf("[@CHENG_DEBUG][%s][%d]: not json file\n", __FUNCTION__, __LINE__); + } + + if(NULL != json_root) + { + printf("[@CHENG_DEBUG][%s][%d]: free json root\n", __FUNCTION__, __LINE__); + cJSON_Delete(json_root); + json_root = NULL; + } +} + #endif 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 785df5a7..18982b0f 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 @@ -72,6 +72,9 @@ typedef struct } mmi_hengai_http_socket_fd_t; + +void mmi_hengai_http_tcp_connect_msg(void * param); +void mmi_hengai_http_tcp_disconnect_msg(void * param); void mm_hengai_http_task_init(void); diff --git a/2.sdk/sdk/gui/lv_watch/lv_theme_watch_night.c b/2.sdk/sdk/gui/lv_watch/lv_theme_watch_night.c index 370e0475..2b92745a 100644 --- a/2.sdk/sdk/gui/lv_watch/lv_theme_watch_night.c +++ b/2.sdk/sdk/gui/lv_watch/lv_theme_watch_night.c @@ -245,6 +245,13 @@ lv_style_t lv_watch_font28; lv_style_t lv_watch_font28_black; lv_style_t lv_watch_font28_gray; lv_style_t lv_watch_font28_yellow; +lv_style_t lv_watch_font32; +lv_style_t lv_watch_font32_black; +lv_style_t lv_watch_font36; +lv_style_t lv_watch_font36_black; +lv_style_t lv_watch_font36_gray; +lv_style_t lv_watch_font60; +lv_style_t lv_watch_font60_black; #endif #ifdef USE_FONT_TTF @@ -258,6 +265,9 @@ lv_font_t lv_font_ttf_22; lv_font_t lv_font_ttf_24; lv_font_t lv_font_ttf_26; lv_font_t lv_font_ttf_28; +lv_font_t lv_font_ttf_32; +lv_font_t lv_font_ttf_36; +lv_font_t lv_font_ttf_60; #endif #elif defined USE_FONT_BIN lv_font_t *lv_font_droidSansFallbackFull_20 = NULL; @@ -1116,6 +1126,34 @@ static void lv_theme_watch_set_private_style(void) style_init_reset(&lv_watch_font28_gray); lv_style_set_text_color(&lv_watch_font28_gray, LV_STATE_DEFAULT, LV_COLOR_GRAY); lv_style_set_text_font(&lv_watch_font28_gray, LV_STATE_DEFAULT, &lv_font_ttf_28); + + style_init_reset(&lv_watch_font32); + lv_style_set_text_color(&lv_watch_font32, LV_STATE_DEFAULT, LV_COLOR_WHITE); + lv_style_set_text_font(&lv_watch_font32, LV_STATE_DEFAULT, &lv_font_ttf_32); + + style_init_reset(&lv_watch_font32_black); + lv_style_set_text_color(&lv_watch_font32_black, LV_STATE_DEFAULT, LV_COLOR_BLACK); + lv_style_set_text_font(&lv_watch_font32_black, LV_STATE_DEFAULT, &lv_font_ttf_32); + + style_init_reset(&lv_watch_font36); + lv_style_set_text_color(&lv_watch_font36, LV_STATE_DEFAULT, LV_COLOR_WHITE); + lv_style_set_text_font(&lv_watch_font36, LV_STATE_DEFAULT, &lv_font_ttf_36); + + style_init_reset(&lv_watch_font36_black); + lv_style_set_text_color(&lv_watch_font36_black, LV_STATE_DEFAULT, LV_COLOR_BLACK); + lv_style_set_text_font(&lv_watch_font36_black, LV_STATE_DEFAULT, &lv_font_ttf_36); + + style_init_reset(&lv_watch_font36_gray); + lv_style_set_text_color(&lv_watch_font36_gray, LV_STATE_DEFAULT, LV_COLOR_GRAY); + lv_style_set_text_font(&lv_watch_font36_gray, LV_STATE_DEFAULT, &lv_font_ttf_36); + + style_init_reset(&lv_watch_font60); + lv_style_set_text_color(&lv_watch_font60, LV_STATE_DEFAULT, LV_COLOR_WHITE); + lv_style_set_text_font(&lv_watch_font60, LV_STATE_DEFAULT, &lv_font_ttf_60); + + style_init_reset(&lv_watch_font60_black); + lv_style_set_text_color(&lv_watch_font60_black, LV_STATE_DEFAULT, LV_COLOR_BLACK); + lv_style_set_text_font(&lv_watch_font60_black, LV_STATE_DEFAULT, &lv_font_ttf_60); #endif /*lv_watch_style_transp*/ @@ -1220,6 +1258,9 @@ lv_theme_t * lv_theme_watch_night_init(void) lv_freetype_font_init(&lv_font_ttf_24, LV_FONT_TTF, 24); lv_freetype_font_init(&lv_font_ttf_26, LV_FONT_TTF, 26); lv_freetype_font_init(&lv_font_ttf_28, LV_FONT_TTF, 28); + lv_freetype_font_init(&lv_font_ttf_32, LV_FONT_TTF, 32); + lv_freetype_font_init(&lv_font_ttf_36, LV_FONT_TTF, 36); + lv_freetype_font_init(&lv_font_ttf_60, LV_FONT_TTF, 60); #endif #elif defined USE_FONT_BIN // load from font bin file from resource diff --git a/2.sdk/sdk/gui/lv_watch/lv_theme_watch_night.h b/2.sdk/sdk/gui/lv_watch/lv_theme_watch_night.h index 43f9511b..34501e46 100644 --- a/2.sdk/sdk/gui/lv_watch/lv_theme_watch_night.h +++ b/2.sdk/sdk/gui/lv_watch/lv_theme_watch_night.h @@ -151,6 +151,13 @@ extern lv_style_t lv_watch_font28; extern lv_style_t lv_watch_font28_black; extern lv_style_t lv_watch_font28_gray; extern lv_style_t lv_watch_font28_yellow; +extern lv_style_t lv_watch_font32; +extern lv_style_t lv_watch_font32_black; +extern lv_style_t lv_watch_font36; +extern lv_style_t lv_watch_font36_black; +extern lv_style_t lv_watch_font36_gray; +extern lv_style_t lv_watch_font60; +extern lv_style_t lv_watch_font60_black; #endif extern lv_style_t lv_watch_image; diff --git a/2.sdk/sdk/gui/lv_watch/lv_watch_res.h b/2.sdk/sdk/gui/lv_watch/lv_watch_res.h index 1fd58462..bbbfdaa1 100644 --- a/2.sdk/sdk/gui/lv_watch/lv_watch_res.h +++ b/2.sdk/sdk/gui/lv_watch/lv_watch_res.h @@ -974,6 +974,23 @@ LV_IMG_DECLARE(img_poweron_logo); #define ICON_SETTING_NEW_SMS_SILENT "R:/png/setting/ICON_SETTING_NEW_SMS_SILENT.png" #endif +#ifdef __MMI_CUSTOM_HENG_AI_BLOOD_PRESSURE__ +#define ICON_HENGAI_BP_BTN_BG "R:/png/custom_function/ICON_HENGAI_BP_BTN_BG.png" +#define ICON_HENGAI_BP_BOTTOM_BTN_BG "R:/png/custom_function/ICON_HENGAI_BP_BOTTOM_BTN_BG.png" +#define ICON_HENGAI_BP_ALERT "R:/png/custom_function/ICON_HENGAI_BP_ALERT.png" +#define ICON_HENGAI_BP_SUCCESS "R:/png/custom_function/ICON_HENGAI_BP_SUCCESS.png" +#define ICON_HENGAI_BP_MEASURE_MODE "R:/png/custom_function/ICON_HENGAI_BP_MEASURE_MODE.png" +#define ICON_HENGAI_BP_CALIBRATION_MODE "R:/png/custom_function/ICON_HENGAI_BP_CALIBRATION_MODE.png" +#define ICON_HENGAI_BP_ATTEMPT_MODE "R:/png/custom_function/ICON_HENGAI_BP_ATTEMPT_MODE.png" + +#define ICON_HENGAI_BP_PROMPT_0 "R:/png/custom_function/ICON_HENGAI_BP_PROMPT_0.png" +#define ICON_HENGAI_BP_PROMPT_1 "R:/png/custom_function/ICON_HENGAI_BP_PROMPT_1.png" + +#define ANIM_HENGAI_BP_MEASURE "R:/gif/ANIM_HENGAI_BP_MEASURE.gif" +#define ANIM_HENGAI_BP_CALIBRATE "R:/gif/ANIM_HENGAI_BP_CALIBRATE.gif" +#define ANIM_HENGAI_BP_ATTEMPT "R:/gif/ANIM_HENGAI_BP_ATTEMPT.gif" + +#endif #endif