From: @CHENG <2393524978@qq.com> Date: Fri, 22 Mar 2024 10:00:13 +0000 (+0800) Subject: gengxin X-Git-Url: http://git.snicker.com.cn/?a=commitdiff_plain;h=ece8f7cdc2dbba0a3959ada5ab638994564bab5e;p=mirrors%2FASR3603_Z5_DS.git gengxin --- diff --git a/2.sdk/project/Z5_Z12/product/craneg_modem/config/watch/lv_watch_conf_CUSTOM.h b/2.sdk/project/Z5_Z12/product/craneg_modem/config/watch/lv_watch_conf_CUSTOM.h index 84c36451..fdccd025 100644 --- a/2.sdk/project/Z5_Z12/product/craneg_modem/config/watch/lv_watch_conf_CUSTOM.h +++ b/2.sdk/project/Z5_Z12/product/craneg_modem/config/watch/lv_watch_conf_CUSTOM.h @@ -244,7 +244,8 @@ #define __Default_system_alarm__ -//#define __MMI_CUSTOM_BEI_KE_RUI_SHENG__ +#define __MMI_FZD_PROTOCOL_WITHOUT_PING_COMMAND_SUPPORT__ + #define __HEALTH_MEASURE_FAKE_temperature_DATA__ //#define __MMI_CUSTOM_HENG_AI__ 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 256a108c..b2b93506 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 @@ -6,8 +6,9 @@ static lv_signal_cb_t ancient_scrl_signal; -static uint8_t s_wechat_msg_init_flag = 0; -static nv_watch_wechat_msg_info_t * s_wechat_msg_info = NULL; +//static uint8_t s_wechat_msg_init_flag = 0; +static nv_watch_wechat_msg_info_t s_wechat_msg_info_t = {0}; +static nv_watch_wechat_msg_info_t * s_wechat_msg_info = &s_wechat_msg_info_t; static nv_watch_wechat_msg_item_info_t s_wechat_msg_item_info = {0}; static uint8_t s_wechat_play_anim_count = 0; static char s_wechat_selected_item_index = -1; @@ -28,6 +29,16 @@ void wechat_msg_info_nv_write(void) void mmi_wechat_msg_info_init(void) { +#if 1 + uint32_t nv_data_length = sizeof(nv_watch_wechat_msg_info_t); + + if(nv_data_length != UI_NV_Read_Req(NV_SECTION_UI_WEHAT_MSG, 0, nv_data_length, (uint8_t *)s_wechat_msg_info)) + { + WECHAT_DEBUG_PRINTF("[@CHENG_DEBUG][%s][%d]: NV_SECTION_UI_WEHAT_MSG read fail\n", __FUNCTION__, __LINE__); + _lv_memset_00(s_wechat_msg_info, nv_data_length); + } + +#else if(0 == s_wechat_msg_init_flag) { uint32_t nv_data_length = sizeof(nv_watch_wechat_msg_info_t); @@ -50,6 +61,7 @@ void mmi_wechat_msg_info_init(void) s_wechat_msg_init_flag = 1; } +#endif } uint8_t wechat_msg_info_count_get(void) @@ -91,6 +103,8 @@ void wechat_msg_info_index_item_delete(uint8_t msg_index) } } s_wechat_msg_info->msg_count--; + + wechat_msg_info_nv_write(); } void wechat_msg_info_all_item_delete(void) @@ -104,6 +118,8 @@ void wechat_msg_info_all_item_delete(void) _lv_memset_00(&(s_wechat_msg_info->msg_item[i]), msg_item_info_size); } s_wechat_msg_info->msg_count = 0; + + wechat_msg_info_nv_write(); } void wechat_msg_info_new_item_add(nv_watch_wechat_msg_item_info_t * msg_item) @@ -129,6 +145,8 @@ void wechat_msg_info_new_item_add(nv_watch_wechat_msg_item_info_t * msg_item) s_wechat_msg_info->msg_count++; _lv_memcpy(&(s_wechat_msg_info->msg_item[s_wechat_msg_info->msg_count - 1]), msg_item, msg_item_info_size); + + wechat_msg_info_nv_write(); } void * wechat_actId_ext_get(lv_watch_Activity_Id_t actId) @@ -182,7 +200,9 @@ void wechat_prepare_destory(lv_obj_t * activity_obj) if(WECHAT_CREATED_FROM_ALBUM == ext->from) { + #if USE_LV_WATCH_ALBUM album_photo_share_flag_reset(); + #endif } else if(WECHAT_CREATED_FROM_IMGVIEWER == ext->from) { @@ -1962,6 +1982,29 @@ void wechat_main_screen_refresh(void) lv_obj_set_hidden(ext->img_record, false); uint8_t msg_count = wechat_msg_info_count_get(); + if(0 != msg_count) + { + uint8_t i = 0; + nv_watch_wechat_msg_item_info_t * msg_item = NULL; + + for(i = 0; i < msg_count; i++) + { + wechat_msg_info_index_item_get(i, &msg_item); + + if(1970 > msg_item->msg_time.tm_year + || 2070 < msg_item->msg_time.tm_year + || 12 < msg_item->msg_time.tm_mon + || 31 < msg_item->msg_time.tm_mday + ) + { + WECHAT_DEBUG_PRINTF("[@CHENG_DEBUG][%s][%d]: time content is wrong\n", __FUNCTION__, __LINE__); + wechat_msg_info_all_item_delete(); + msg_count = 0; + break; + } + } + } + if(0 == msg_count) { @@ -2074,6 +2117,29 @@ lv_obj_t * wechat_create(lv_obj_t * activity_obj, lv_wechat_created_from_e from) lv_obj_set_hidden(ext->img_record, false); uint8_t msg_count = wechat_msg_info_count_get(); + if(0 != msg_count) + { + uint8_t i = 0; + nv_watch_wechat_msg_item_info_t * msg_item = NULL; + + for(i = 0; i < msg_count; i++) + { + wechat_msg_info_index_item_get(i, &msg_item); + + if(1970 > msg_item->msg_time.tm_year + || 2070 < msg_item->msg_time.tm_year + || 12 < msg_item->msg_time.tm_mon + || 31 < msg_item->msg_time.tm_mday + ) + { + WECHAT_DEBUG_PRINTF("[@CHENG_DEBUG][%s][%d]: time content is wrong\n", __FUNCTION__, __LINE__); + wechat_msg_info_all_item_delete(); + msg_count = 0; + break; + } + } + } + if(0 == msg_count) { lv_obj_set_hidden(ext->label_no_msg, false); 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 1da9d7d7..4f5971fe 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 @@ -1,13 +1,14 @@ -//#ifdef __MMI_WECHAT_SUPPORT__ +#ifdef __MMI_WECHAT_SUPPORT__ static lv_signal_cb_t ancient_scrl_signal; -static uint8_t s_wechat_msg_init_flag = 0; -static nv_watch_wechat_msg_info_t * s_wechat_msg_info = NULL; +//static uint8_t s_wechat_msg_init_flag = 0; +static nv_watch_wechat_msg_info_t s_wechat_msg_info_t = {0}; +static nv_watch_wechat_msg_info_t * s_wechat_msg_info = &s_wechat_msg_info_t; static nv_watch_wechat_msg_item_info_t s_wechat_msg_item_info = {0}; static uint8_t s_wechat_play_anim_count = 0; static char s_wechat_selected_item_index = -1; @@ -28,6 +29,16 @@ void wechat_msg_info_nv_write(void) void mmi_wechat_msg_info_init(void) { +#if 1 + uint32_t nv_data_length = sizeof(nv_watch_wechat_msg_info_t); + + if(nv_data_length != UI_NV_Read_Req(NV_SECTION_UI_WEHAT_MSG, 0, nv_data_length, (uint8_t *)s_wechat_msg_info)) + { + WECHAT_DEBUG_PRINTF("[@CHENG_DEBUG][%s][%d]: NV_SECTION_UI_WEHAT_MSG read fail\n", __FUNCTION__, __LINE__); + _lv_memset_00(s_wechat_msg_info, nv_data_length); + } + +#else if(0 == s_wechat_msg_init_flag) { uint32_t nv_data_length = sizeof(nv_watch_wechat_msg_info_t); @@ -50,28 +61,9 @@ void mmi_wechat_msg_info_init(void) s_wechat_msg_init_flag = 1; } +#endif } -void mmi_wechat_msg_info_reset(void) -{ - if(s_wechat_msg_info!=NULL) - { - lv_mem_free(s_wechat_msg_info); - s_wechat_msg_info = NULL; - - } - uint32_t nv_data_length = sizeof(nv_watch_wechat_msg_info_t); - s_wechat_msg_info = (nv_watch_wechat_msg_info_t *)lv_mem_alloc(nv_data_length); - if(NULL == s_wechat_msg_info) - { - WECHAT_DEBUG_PRINTF("[@CHENG_DEBUG][%s][%d]: memory alloc fail\n", __FUNCTION__, __LINE__); - return; - } - _lv_memset_00(s_wechat_msg_info, nv_data_length); -} - - - uint8_t wechat_msg_info_count_get(void) { uint8_t msg_count = s_wechat_msg_info->msg_count; @@ -111,6 +103,8 @@ void wechat_msg_info_index_item_delete(uint8_t msg_index) } } s_wechat_msg_info->msg_count--; + + wechat_msg_info_nv_write(); } void wechat_msg_info_all_item_delete(void) @@ -124,6 +118,8 @@ void wechat_msg_info_all_item_delete(void) _lv_memset_00(&(s_wechat_msg_info->msg_item[i]), msg_item_info_size); } s_wechat_msg_info->msg_count = 0; + + wechat_msg_info_nv_write(); } void wechat_msg_info_new_item_add(nv_watch_wechat_msg_item_info_t * msg_item) @@ -149,6 +145,8 @@ void wechat_msg_info_new_item_add(nv_watch_wechat_msg_item_info_t * msg_item) s_wechat_msg_info->msg_count++; _lv_memcpy(&(s_wechat_msg_info->msg_item[s_wechat_msg_info->msg_count - 1]), msg_item, msg_item_info_size); + + wechat_msg_info_nv_write(); } void * wechat_actId_ext_get(lv_watch_Activity_Id_t actId) @@ -202,7 +200,9 @@ void wechat_prepare_destory(lv_obj_t * activity_obj) if(WECHAT_CREATED_FROM_ALBUM == ext->from) { + #if USE_LV_WATCH_ALBUM album_photo_share_flag_reset(); + #endif } else if(WECHAT_CREATED_FROM_IMGVIEWER == ext->from) { @@ -431,11 +431,6 @@ lv_obj_t * wechat_confirm_create(lv_obj_t * activity_obj) void wechat_msg_receive_update_ui(void) { WECHAT_DEBUG_PRINTF("[@CHENG_DEBUG][%s][%d]: \n", __FUNCTION__, __LINE__); - - if(true != mmi_protocol_watch_bind_state_get()) - { - mmi_protocol_fzd_action_bind(); - } if(AUDIO_CTRL_PRIORITY_5 == Hal_Audio_Manage_Start_Req(AUDIO_CTRL_PRIORITY_5, wechat_receive_audio_play_audio_ctrl_callback)) { @@ -826,7 +821,7 @@ void wechat_msg_sending_screen_timeout(void *para) lv_obj_align(sending_ext->sending_img, NULL, LV_ALIGN_CENTER, 0, 0); lv_label_set_text_id(sending_ext->sending_label, ((true == result) ? WATCH_TEXT_ID_COMMON_SEND_SUCCESS : WATCH_TEXT_ID_COMMON_SEND_FAILED)); - lv_obj_align(sending_ext->sending_label, NULL, LV_ALIGN_IN_BOTTOM_MID, 0, -100); + lv_obj_align(sending_ext->sending_label, NULL, LV_ALIGN_CENTER, 0, -10); } sending_ext->result_timer_id = Hal_Timer_Start(1500, wechat_msg_sending_result_screen_timeout, sending_ext, FALSE); @@ -894,7 +889,7 @@ lv_obj_t * wechat_msg_sending_screen_create(lv_obj_t * activity_obj) //lv_obj_set_width(label, lv_obj_get_width(obj) * 2 / 3); lv_label_set_text_id(label, WATCH_TEXT_ID_COMMON_SENDING); lv_label_set_align(label, LV_LABEL_ALIGN_CENTER); - lv_obj_align(label, NULL, LV_ALIGN_IN_BOTTOM_MID, 0, -100); + lv_obj_align(label, NULL, LV_ALIGN_CENTER, 0, -10); sending_ext->sending_label = label; /* @@ -1405,11 +1400,7 @@ void wechat_chat_list_msg_item_style_reset(lv_wechat_ext_t * ext) void wechat_chat_list_msg_item_time(char * time_str, hal_rtc_t * cur_time, hal_rtc_t * msg_time, hal_rtc_t * last_msg_time) { WECHAT_DEBUG_PRINTF("[@CHENG_DEBUG][%s][%d]: \n", __FUNCTION__, __LINE__); - if(msg_time->tm_year<1980 || msg_time->tm_year>2044 || msg_time->tm_mon>12 || msg_time->tm_mday>31 ) - { - mmi_wechat_msg_info_reset(); - return; - } + if(0 == last_msg_time->tm_year) { sprintf(time_str, "%d/%d/%d %02d:%02d", msg_time->tm_year, msg_time->tm_mon, msg_time->tm_mday, @@ -2043,6 +2034,29 @@ void wechat_main_screen_refresh(void) lv_obj_set_hidden(ext->img_record, false); uint8_t msg_count = wechat_msg_info_count_get(); + if(0 != msg_count) + { + uint8_t i = 0; + nv_watch_wechat_msg_item_info_t * msg_item = NULL; + + for(i = 0; i < msg_count; i++) + { + wechat_msg_info_index_item_get(i, &msg_item); + + if(1970 > msg_item->msg_time.tm_year + || 2070 < msg_item->msg_time.tm_year + || 12 < msg_item->msg_time.tm_mon + || 31 < msg_item->msg_time.tm_mday + ) + { + WECHAT_DEBUG_PRINTF("[@CHENG_DEBUG][%s][%d]: time content is wrong\n", __FUNCTION__, __LINE__); + wechat_msg_info_all_item_delete(); + msg_count = 0; + break; + } + } + } + if(0 == msg_count) { @@ -2139,9 +2153,8 @@ lv_obj_t * wechat_create(lv_obj_t * activity_obj, lv_wechat_created_from_e from) lv_obj_set_hidden(ext->label_no_msg, true); lv_obj_set_hidden(ext->img_record, true); } - else if(//true != mmi_watch_tcp_connect_state_get() - //|| - true != mmi_protocol_watch_bind_state_get() + else if(true != mmi_watch_tcp_connect_state_get() + || true != mmi_protocol_watch_bind_state_get() ) { lv_obj_set_hidden(ext->label_no_network, true); @@ -2156,6 +2169,29 @@ lv_obj_t * wechat_create(lv_obj_t * activity_obj, lv_wechat_created_from_e from) lv_obj_set_hidden(ext->img_record, false); uint8_t msg_count = wechat_msg_info_count_get(); + if(0 != msg_count) + { + uint8_t i = 0; + nv_watch_wechat_msg_item_info_t * msg_item = NULL; + + for(i = 0; i < msg_count; i++) + { + wechat_msg_info_index_item_get(i, &msg_item); + + if(1970 > msg_item->msg_time.tm_year + || 2070 < msg_item->msg_time.tm_year + || 12 < msg_item->msg_time.tm_mon + || 31 < msg_item->msg_time.tm_mday + ) + { + WECHAT_DEBUG_PRINTF("[@CHENG_DEBUG][%s][%d]: time content is wrong\n", __FUNCTION__, __LINE__); + wechat_msg_info_all_item_delete(); + msg_count = 0; + break; + } + } + } + if(0 == msg_count) { lv_obj_set_hidden(ext->label_no_msg, false); @@ -2186,4 +2222,4 @@ void wechat_create_event_cb(lv_obj_t * btn, lv_event_t e) } } -//#endif +#endif diff --git a/2.sdk/sdk/gui/lv_watch/lv_apps/setting/setting.c b/2.sdk/sdk/gui/lv_watch/lv_apps/setting/setting.c index fd88e1b5..43b2570b 100644 --- a/2.sdk/sdk/gui/lv_watch/lv_apps/setting/setting.c +++ b/2.sdk/sdk/gui/lv_watch/lv_apps/setting/setting.c @@ -57,12 +57,12 @@ static mmi_watch_list_item_t settingList[] = #ifdef __MMI_NEW_SMS_SILENT_SUPPORT__ { ICON_SETTING_NEW_SMS_SILENT, WATCH_TEXT_ID_NEW_SMS_SILENT, setting_new_sms_silent_create_event_cb }, #endif -#ifdef __MMI_APP_QRCODE_MENU_SUPPORT__ - { ICON_SETTING_APP_QRCODE, WATCH_TEXT_ID_APP_QRCODE, app_qrcode_create_event_cb }, -#endif #ifdef __MMI_BLOOD_PRESSURE_SUPPORT__ { BlOOD_PRESSURE_LIST_PNG, WATCH_TEXT_ID_Blood_pressure_calibration, setting_Blood_pressure_create_event_cb }, #endif +#ifdef __MMI_APP_QRCODE_MENU_SUPPORT__ + { ICON_SETTING_APP_QRCODE, WATCH_TEXT_ID_APP_QRCODE, app_qrcode_create_event_cb }, +#endif #if USE_LV_WATCH_QRCODE != 0 { ICON_SETTING_QRCODE, WATCH_TEXT_ID_DEVICE_QRCODE, qrcode_create_event_cb }, #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 93633665..e8f64210 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 @@ -27,7 +27,11 @@ bool mmi_watch_tcp_connect_state_get(void) bool mmi_protocol_watch_bind_state_get(void) { +#ifdef __MMI_FZD_PROTOCOL_WITHOUT_PING_COMMAND_SUPPORT__ + return true; +#else return s_watch_bind_state; +#endif } void mmi_protocol_watch_bind_state_set(bool state) 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 5ec203f0..6f863589 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 @@ -553,6 +553,12 @@ static bool mmi_protocol_fzd_send_with_data(MMI_PROTOCOL_FZD_ACTION_ENUM action, } ///////////////////////// +#ifdef __MMI_FZD_PROTOCOL_WITHOUT_PING_COMMAND_SUPPORT__ +static bool s_first_lk_command_received = false; + +bool mmi_protocol_first_lk_command_received_action(void); +#endif + bool mmi_protocol_fzd_action_LINK(void) { @@ -561,11 +567,18 @@ bool mmi_protocol_fzd_action_LINK(void) bool mmi_protocol_fzd_parse_LINK(unsigned char * next_buff, unsigned int next_buff_len) { +#ifdef __MMI_FZD_PROTOCOL_WITHOUT_PING_COMMAND_SUPPORT__ + if(false == s_first_lk_command_received) + { + s_first_lk_command_received = true; + mmi_protocol_first_lk_command_received_action(); + } +#else if(true != mmi_protocol_watch_bind_state_get()) { mmi_protocol_fzd_action_bind(); } - //mmi_protocol_watch_heartbeat_action(); +#endif return true; } @@ -590,8 +603,7 @@ bool mmi_protocol_fzd_action_HEARTBEAT(void) _lv_memset_00(content_buff, 128); Hal_Rtc_Gettime(&cur_time); - - + sprintf(content_buff, ",%02d%02d%02d,%u,%u,%u", cur_time.tm_year%2000, cur_time.tm_mon, cur_time.tm_mday, step_num, roll_num, battery_percent); content_lenth = strlen(content_buff); @@ -603,10 +615,6 @@ bool mmi_protocol_fzd_action_HEARTBEAT(void) bool mmi_protocol_fzd_parse_HEARTBEAT(unsigned char * next_buff, unsigned int next_buff_len) { - //if(true != mmi_protocol_watch_bind_state_get()) - //{ - // mmi_protocol_fzd_action_bind(); - //} if(0 == s_fzd_time_data_flag) { mmi_protocol_fzd_action_get_time(); @@ -617,7 +625,11 @@ bool mmi_protocol_fzd_parse_HEARTBEAT(unsigned char * next_buff, unsigned int ne bool mmi_protocol_fzd_action_bind(void) { +#ifdef __MMI_FZD_PROTOCOL_WITHOUT_PING_COMMAND_SUPPORT__ + return false; +#else return mmi_protocol_fzd_send_without_data(MMI_FZD_ACTION_BIND); +#endif } bool mmi_protocol_fzd_parse_ACTION_BIND(unsigned char * next_buff, unsigned int next_buff_len) @@ -632,6 +644,13 @@ bool mmi_protocol_fzd_parse_ACTION_BIND(unsigned char * next_buff, unsigned int } value = atoi(next_buff); + +#ifdef __MMI_FZD_PROTOCOL_WITHOUT_PING_COMMAND_SUPPORT__ + if(0 == value) + { + mmi_watch_factory_aciton(); + } +#else if(true == mmi_protocol_watch_bind_state_get()) { if(0 == value) @@ -671,10 +690,39 @@ bool mmi_protocol_fzd_parse_ACTION_BIND(unsigned char * next_buff, unsigned int } } +#endif return true; } +#ifdef __MMI_FZD_PROTOCOL_WITHOUT_PING_COMMAND_SUPPORT__ +bool mmi_protocol_first_lk_command_received_action(void) +{ + // sim unbind check +#ifdef __MMI_ZHSX_SUPPORT_CHECK_SIM_UNBIND__ + mmi_watch_sim_unbind_check(); +#endif + + // socket heartbeat + mmi_protocol_watch_heartbeat_action(); + + // timing mission + mmi_protocol_watch_timed_mission_action(); + + //video call +#ifdef __MMI_ZHSX_SUPPORT_VIDEO_CALL__ + mmi_protocol_fzd_action_get_vc_config(); +#endif + + // hengai +#ifdef __MMI_CUSTOM_HENG_AI__ + mmi_hengai_sleep_activation_check_action(); +#endif + + +} +#endif + bool mmi_protocol_fzd_action_get_time(void) { return mmi_protocol_fzd_send_without_data(MMI_FZD_ACTION_GET_TIME); @@ -786,6 +834,19 @@ bool mmi_protocol_fzd_parse_SERVER_SET_POWEROFF(unsigned char * next_buff, unsig return result; } +bool mmi_protocol_fzd_parse_SERVER_SET_REBOOT(unsigned char * next_buff, unsigned int next_buff_len) +{ + bool result = false; + MMI_PROTOCOL_FZD_ACTION_ENUM action = MMI_FZD_SERVER_SET_REBOOT; + + result = true; + mmi_protocol_fzd_send_without_data(action); + + //mmi_watch_reboot_aciton(); + + return result; +} + bool mmi_protocol_fzd_parse_SERVER_FIND_WATCH(unsigned char * next_buff, unsigned int next_buff_len) { bool result = false; @@ -2048,10 +2109,18 @@ void mmi_protocol_fzd_set_warning_info(MMI_PROTOCOL_FZD_WARNING_TYPE_ENUM warnin case MMI_FZD_WARNING_TYPE_TAKE_OFF: s_fzd_warning_info.take_off = value; + if(true == value) + { + s_fzd_warning_info.take_on = false; + } break; case MMI_FZD_WARNING_TYPE_TAKE_ON: s_fzd_warning_info.take_on = value; + if(true == value) + { + s_fzd_warning_info.take_off = false; + } break; case MMI_FZD_WARNING_TYPE_FALL_DOWN: 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 6a8698d2..53c59d4d 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 @@ -138,6 +138,7 @@ typedef enum MMI_FZD_SERVER_SET_CENTER_NUMBER, MMI_FZD_SERVER_SET_MONITOR, MMI_FZD_ACTION_UNBIND, + MMI_FZD_SERVER_SET_REBOOT, #ifdef __MMI_ZHSX_SUPPORT_VIDEO_CALL__ #if defined(__MMI_ZHSX_SUPPORT_VIDEO_CALL_WULIAN__) || defined(__MMI_ZHSX_SUPPORT_VIDEO_CALL_FZD__) || defined(__MMI_ZHSX_SUPPORT_VIDEO_CALL_TONGXIN__) @@ -253,6 +254,7 @@ bool mmi_protocol_fzd_parse_SERVER_SET_UD_INTERVAL(unsigned char * next_buff, un bool mmi_protocol_fzd_parse_SERVER_SET_FACTORY(unsigned char * next_buff, unsigned int next_buff_len); bool mmi_protocol_fzd_parse_SERVER_SET_POWEROFF(unsigned char * next_buff, unsigned int next_buff_len); +bool mmi_protocol_fzd_parse_SERVER_SET_REBOOT(unsigned char * next_buff, unsigned int next_buff_len); bool mmi_protocol_fzd_parse_SERVER_FIND_WATCH(unsigned char * next_buff, unsigned int next_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 0ef90fa3..cb5cc2c5 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 @@ -60,6 +60,7 @@ static unsigned char * mmi_protocol_fzd_action_string_get(MMI_PROTOCOL_FZD_ACTIO {MMI_FZD_SERVER_SET_CENTER_NUMBER, "CENTER"}, {MMI_FZD_SERVER_SET_MONITOR, "MONITOR"}, {MMI_FZD_ACTION_UNBIND, "DLT"}, + {MMI_FZD_SERVER_SET_REBOOT, "REBOOT"}, #ifdef __MMI_ZHSX_SUPPORT_VIDEO_CALL__ #ifdef __MMI_ZHSX_SUPPORT_VIDEO_CALL_WULIAN__ @@ -310,6 +311,10 @@ static bool mmi_protocol_fzd_content_parse(unsigned char * content_ptr, unsigned case MMI_FZD_ACTION_UNBIND: break; + case MMI_FZD_SERVER_SET_REBOOT: + mmi_protocol_fzd_parse_SERVER_SET_REBOOT(next_buff, next_buff_len); + break; + #ifdef __MMI_ZHSX_SUPPORT_VIDEO_CALL__ #if defined(__MMI_ZHSX_SUPPORT_VIDEO_CALL_WULIAN__) || defined(__MMI_ZHSX_SUPPORT_VIDEO_CALL_FZD__) || defined(__MMI_ZHSX_SUPPORT_VIDEO_CALL_TONGXIN__) case MMI_FZD_WATCH_GET_VC_CONFIG: diff --git a/2.sdk/sdk/gui/lvgl/hal/hal.c b/2.sdk/sdk/gui/lvgl/hal/hal.c index 0bac5c28..20776de7 100644 --- a/2.sdk/sdk/gui/lvgl/hal/hal.c +++ b/2.sdk/sdk/gui/lvgl/hal/hal.c @@ -1793,9 +1793,9 @@ extern void boot_flag_set(uint8_t value) __attribute__((weak)); VOID Hal_Power_Off(HAL_POWER_OFF_TYPE type) { #ifdef __MMI_ZHSX_SUPPORT__ -#ifdef __MMI_WECHAT_SUPPORT__ - wechat_msg_info_nv_write(); -#endif +//#ifdef __MMI_WECHAT_SUPPORT__ +// wechat_msg_info_nv_write(); +//#endif asl_pedometer_steps_save(true); #endif