From 215b794f9bc7ae0a9f84a5baf6f221e06c73b297 Mon Sep 17 00:00:00 2001 From: penglei <1624952103@qq.com> Date: Fri, 27 Dec 2024 18:16:44 +0800 Subject: [PATCH] =?utf8?q?=E5=8A=9F=E8=80=97runtime=E5=A2=9E=E5=8A=A0?= =?utf8?q?=E8=BF=90=E5=8A=A8=E4=BA=8B=E4=BB=B6=E4=B8=8A=E6=8A=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- code/sdk/drivers/peripheral/cywee/src/main_dml.c | 2 ++ code/sdk/drivers/peripheral/utils/custom_save_runtime.h | 6 +++++- tools/log_parser/runtimeanalysis_2.0.py | 5 +++++ 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/code/sdk/drivers/peripheral/cywee/src/main_dml.c b/code/sdk/drivers/peripheral/cywee/src/main_dml.c index 693826b65..ac9ac6ad6 100644 --- a/code/sdk/drivers/peripheral/cywee/src/main_dml.c +++ b/code/sdk/drivers/peripheral/cywee/src/main_dml.c @@ -1212,6 +1212,7 @@ void CWM_AP_SensorListen(pSensorEVT_t sensorEVT) { CWM_OS_dbgPrintf("IDX_ALGO_SHAKE\n"); break; case IDX_ALGO_INACTIVITY_OUTPUT: + uapi_save_runtime_log(RUNTIME_LOG_INACTIVITY_REPORT); if(uapi_dev_runtime_get_absolute_static_status()) //绝对静止 直接退出 { if((int)sensorEVT->fData[0] == 31 || (int)sensorEVT->fData[0] == 32) //最后一笔数据上报时 清除相应标志位 @@ -1356,6 +1357,7 @@ void CWM_AP_SensorListen(pSensorEVT_t sensorEVT) { } break; case IDX_ALGO_ACTIVITY_OUTPUT: + uapi_save_runtime_log(RUNTIME_LOG_ACTIVITY_REPORT); is_static_state = 0; // cywee_func = cywee_get_send_msg_callback_func(); if((int)sensorEVT->fData[0] == 100) diff --git a/code/sdk/drivers/peripheral/utils/custom_save_runtime.h b/code/sdk/drivers/peripheral/utils/custom_save_runtime.h index 6fe865f1d..5d3113b9c 100644 --- a/code/sdk/drivers/peripheral/utils/custom_save_runtime.h +++ b/code/sdk/drivers/peripheral/utils/custom_save_runtime.h @@ -2,7 +2,7 @@ *@Author:luozheng 1732036298@qq.com *@Date:2024-12-18 10:27:52 * @LastEditors: penglei 1624952103@qq.com - * @LastEditTime: 2024-12-23 11:17:49 + * @LastEditTime: 2024-12-27 18:15:51 *@FilePath:/FD230/code/sdk/drivers/peripheral/utils/custom_save_runtime.h */ /** @@ -115,6 +115,10 @@ extern "C" RUNTIME_LOG_SPORT_RESUME, // 结束运动 RUNTIME_LOG_SPORT_END, + //运动事件上报 + RUNTIME_LOG_ACTIVITY_REPORT, + //静态事件上报 + RUNTIME_LOG_INACTIVITY_REPORT, /*******************************/ /*******************************/ diff --git a/tools/log_parser/runtimeanalysis_2.0.py b/tools/log_parser/runtimeanalysis_2.0.py index a9a3a88f5..8b8d9772b 100644 --- a/tools/log_parser/runtimeanalysis_2.0.py +++ b/tools/log_parser/runtimeanalysis_2.0.py @@ -36,6 +36,8 @@ str_bin_list =[ ['0001', "开机 "], ['0405',"停止运动"], ['0406',"恢复运动"], ['0407',"运动结束"], + ['0408',"运动事件上报"], + ['0409',"静态事件上报"], ['0501',"主动检测心率"], ['0502',"主动检测心率结束"], ['0503',"被动检测心率"], @@ -47,6 +49,9 @@ str_bin_list =[ ['0001', "开机 "], ['0509',"心率结果未佩戴"], ['050a',"心率结果无效值"], ['050b',"检测成功"], + ['050c',"获取到1个无效值"], + ['050d',"获取到1个有效值"], + ['050e',"获取到1个未佩戴值"], ['0601',"开启佩戴检测"], ['0602',"关闭佩戴检测"], ['0701',"主动检测血氧"], -- 2.17.1