From: @CHENG <2393524978@qq.com> Date: Tue, 9 Jul 2024 01:31:39 +0000 (+0800) Subject: gengxin X-Git-Url: http://git.snicker.com.cn/sitemap.xml?a=commitdiff_plain;h=50b11ac02407e2fef55f87f8231cd87e172a2c5d;p=mirrors%2FASR3603_Z5_DS.git gengxin --- 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 70433085..e9ad9e0e 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 @@ -1636,6 +1636,95 @@ static unsigned int mmi_protocol_fzd_action_send_content_fill_location_data(unsi MMI_PROTOCOL_FZD_ACTION_ENUM action, unsigned char * alert_info) { +#if 1 + + unsigned char * t_ptr = NULL; + unsigned int t_count = 0, t_total_count = 0; + hal_rtc_t cur_time = {0}, cur_utc_time = {0}; + unsigned int battery_value = Hal_Battery_Get_Status(); + unsigned int sleep_roll_value = 0; + unsigned int step_value = asl_pedometer_steps_get(); + uint8_t i = 0; + char data_str[256] = {0}; + + t_ptr = content_buff; + + //seperator & time + Hal_Rtc_Gettime_Utc(&cur_utc_time); + t_count = sprintf(t_ptr, ",%02u%02u%02u,%02u%02u%02u", + cur_utc_time.tm_year%100, + cur_utc_time.tm_mon, + cur_utc_time.tm_mday, + cur_utc_time.tm_hour, + cur_utc_time.tm_min, + cur_utc_time.tm_sec); + t_total_count += t_count; + + //gps + t_ptr += t_count; + mmi_location_gps_data_process(&(location_data->gps_data), data_str); + t_count = sprintf(t_ptr, ",%s", data_str); + t_total_count += t_count; + + // + t_ptr += t_count; + t_count = sprintf(t_ptr, ",%d,%u,%u,%u", + location_data->cell_data.link_rxlev, + battery_value, + step_value, + sleep_roll_value); + t_total_count += t_count; + + //alert info + t_ptr += t_count; + if (NULL != alert_info) + { + t_count = sprintf(t_ptr, ",%s", alert_info); + } + else + { + t_count = sprintf(t_ptr, ",%s", "00000000"); + } + t_total_count += t_count; + + //cell + t_ptr += t_count; + t_count = sprintf(t_ptr, ",%u,%u,%u,%u", + location_data->cell_data.cell_num, + 1, + location_data->cell_data.mcc, + location_data->cell_data.mnc); + t_total_count += t_count; + for (i = 0; i < location_data->cell_data.cell_num; i++) + { + t_ptr += t_count; + t_count = sprintf(t_ptr, ",%u,%u,%d", location_data->cell_data.lac[i], location_data->cell_data.cell_id[i], location_data->cell_data.rxlev[i]); + t_total_count += t_count; + } + + //wifi + t_ptr += t_count; + t_count = sprintf(t_ptr, ",%u", location_data->wifi_data.count); + t_total_count += t_count; + for (i = 0; i < location_data->wifi_data.count; i++) + { + t_ptr += t_count; + t_count = sprintf(t_ptr, ",wifi%u,%02x:%02x:%02x:%02x:%02x:%02x,%d", + i, + location_data->wifi_data.item[i].mac[0], + location_data->wifi_data.item[i].mac[1], + location_data->wifi_data.item[i].mac[2], + location_data->wifi_data.item[i].mac[3], + location_data->wifi_data.item[i].mac[4], + location_data->wifi_data.item[i].mac[5], + location_data->wifi_data.item[i].rssi); + t_total_count += t_count; + } + + return t_total_count; + +#else + unsigned char * t_ptr = NULL; unsigned int t_count = 0; hal_rtc_t cur_time = {0}, cur_utc_time = {0}; @@ -1722,6 +1811,7 @@ static unsigned int mmi_protocol_fzd_action_send_content_fill_location_data(unsi t_count = strlen(content_buff); return t_count; +#endif } bool mmi_protocol_fzd_action_send_location(MMI_WATCH_LOCATION_DATA_T * location_data)