From 702a4c896b2ad14e8615e87e8045b54882a0e049 Mon Sep 17 00:00:00 2001 From: =?utf8?q?=E5=BD=AD=E7=A3=8A?= <1624952103@qq.com> Date: Sat, 28 Dec 2024 10:51:32 +0000 Subject: [PATCH] Merge #1580 into sdk602patch0911 from refs/changes/1580/head MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 功耗runtime增加运动事件上报 * refs/changes/1580/head: (1 commits squashed) - 功耗runtime增加运动事件上报 Signed-off-by: aliyun6865282430 <1624952103@qq.com> Reviewed-by: Caisking <3449750381@qq.com> Reviewed-by: 罗正 <1732036298@qq.com> Reviewed-by: aliyun8003852482 <1224667075@qq.com> Reviewed-by: snickersun@163.com Reviewed-by: aliyun6865282430 <1624952103@qq.com> Merged-by: Caisking <3449750381@qq.com> CR-link: https://codeup.aliyun.com/64191456b9581d62e8f81ac0/FD230/change/1580 --- 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 7f917886e..d9f897b0b 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