From: luozheng <1732036298@qq.com> Date: Tue, 31 Dec 2024 09:47:39 +0000 (+0800) Subject: 增加4g开关功耗记录 X-Git-Tag: v1.3.113-repair_tp~21^2~42^2~1 X-Git-Url: http://git.snicker.com.cn/css/static/gitweb.css?a=commitdiff_plain;h=refs%2Fchanges%2F1585%2F1;p=mirrors%2FFD230.git 增加4g开关功耗记录 --- diff --git a/code/sdk/drivers/peripheral/utils/custom_save_runtime.h b/code/sdk/drivers/peripheral/utils/custom_save_runtime.h index cdd070820..5796928c5 100644 --- a/code/sdk/drivers/peripheral/utils/custom_save_runtime.h +++ b/code/sdk/drivers/peripheral/utils/custom_save_runtime.h @@ -1,8 +1,8 @@ /* *@Author:luozheng 1732036298@qq.com *@Date:2024-12-18 10:27:52 - * @LastEditors: penglei 1624952103@qq.com - * @LastEditTime: 2024-12-27 18:15:51 + * @LastEditors: luozheng 1732036298@qq.com + * @LastEditTime: 2024-12-31 17:23:54 *@FilePath:/FD230/code/sdk/drivers/peripheral/utils/custom_save_runtime.h */ /** @@ -98,6 +98,8 @@ extern "C" RUNTIME_LOG_CAT1_UDP_MSG_ATCMD, // 030a CAT1 AT指令 RUNTIME_LOG_CAT1_UDP_MSG_RECV_DMP, // 030b 入库配置flag RUNTIME_LOG_CAT1_UDP_MSG_SMS, // 030c CAT1接收到的SMS信息给MCU,包含电话号及短信内容 + RUNTIME_LOG_CAT1_4G_OPEN, // 030d CAT1 4G开启 + RUNTIME_LOG_CAT1_4G_CLOSE, // 030e CAT1 4G关闭 /*运动*/ RUNTIME_LOG_SPORT_MIN = 0x0400, diff --git a/code/sdk/drivers/peripheral/utils/custom_utils.c b/code/sdk/drivers/peripheral/utils/custom_utils.c index 38291bc40..a50eb475a 100644 --- a/code/sdk/drivers/peripheral/utils/custom_utils.c +++ b/code/sdk/drivers/peripheral/utils/custom_utils.c @@ -1440,6 +1440,7 @@ void uapi_set4GCapability(bool isopen) void *tcp_thread_id = NULL; if(isopen) { + uapi_save_runtime_log(RUNTIME_LOG_CAT1_4G_OPEN); power_on_cat1(); // if(!uapi_dev_runtime_get_saveele_status()) { @@ -1459,6 +1460,7 @@ void uapi_set4GCapability(bool isopen) } else { + uapi_save_runtime_log(RUNTIME_LOG_CAT1_4G_CLOSE); power_off_cat1(); // if(!uapi_dev_runtime_get_saveele_status()) { diff --git a/tools/log_parser/runtimeanalysis_2.0.py b/tools/log_parser/runtimeanalysis_2.0.py index 8b8d9772b..3cd9e1524 100644 --- a/tools/log_parser/runtimeanalysis_2.0.py +++ b/tools/log_parser/runtimeanalysis_2.0.py @@ -107,6 +107,9 @@ str_bin_list =[ ['0001', "开机 "], ['0309',"获取Cat1版本号"], ['030a',"CAT1 AT指令"], ['030b',"入库配置flag"], + ['030c',"CAT1接收到的SMS信息给MCU,包含电话号及短信内容"], + ['030d',"CAT1 4G开启"], + ['030e',"CAT1 4G关闭"], ['1001',"M_SLEEP_1"],#睡 ['1002',"M_SLEEP_0"],#没睡 ['1003',"S_SLEEP_1"],#睡