From 9c2c51cf865a97345a0a6ce9b6ea5b151b9790d8 Mon Sep 17 00:00:00 2001 From: hcj <1224667075@qq.com> Date: Tue, 17 Dec 2024 19:22:38 +0800 Subject: [PATCH] =?utf8?q?=E4=BF=AE=E6=94=B9=E8=BF=90=E8=A1=8C=E6=97=A5?= =?utf8?q?=E5=BF=97=E4=BF=9D=E5=AD=98=E8=8E=B7=E5=8F=96=E6=97=B6=E9=97=B4?= =?utf8?q?=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- .../peripheral/utils/custom_save_runtime.c | 5 ++- .../peripheral/utils/custom_save_runtime.h | 43 ++++++++++++++++--- 2 files changed, 42 insertions(+), 6 deletions(-) diff --git a/code/sdk/drivers/peripheral/utils/custom_save_runtime.c b/code/sdk/drivers/peripheral/utils/custom_save_runtime.c index 0cc3b21a1..9a6a895c0 100644 --- a/code/sdk/drivers/peripheral/utils/custom_save_runtime.c +++ b/code/sdk/drivers/peripheral/utils/custom_save_runtime.c @@ -46,6 +46,8 @@ #include +#include + #define RUNTIME_LOG_SAVE_PATH EXC_TAR_PATH @@ -69,7 +71,8 @@ errcode_t uapi_save_runtime_log(uint16_t cmd) custom_cmd_t mail = {0}; mail.cmd = (uint16_t)cmd; - mail.time= (uint32_t)get_local_timestamp(); + mail.time= (uint32_t)osKernelGetTickCount(); + if(custom_running_log_state_stat==0 || g_runtime_log_queue_created==0) { diff --git a/code/sdk/drivers/peripheral/utils/custom_save_runtime.h b/code/sdk/drivers/peripheral/utils/custom_save_runtime.h index dba2b365d..5ae981f88 100644 --- a/code/sdk/drivers/peripheral/utils/custom_save_runtime.h +++ b/code/sdk/drivers/peripheral/utils/custom_save_runtime.h @@ -20,12 +20,45 @@ extern "C" { typedef enum { - //开机关机 + //开机关机 RUNTIME_LOG_POWER_MIN =0x0000, - //蓝牙 - RUNTIME_LOG_POWER_BLE_MIN=0x0100, - //cat1 - RUNTIME_LOG_POWER_CAT1_MIN=0x0200, + RUNTIME_LOG_POWER_ON,//0x0001 + RUNTIME_LOG_OTA, // + + //蓝牙 + RUNTIME_LOG_BLE_MIN=0x0100, + //电话 + RUNTIME_LOG_PHONE_MIN=0x0200, + //cat1 + RUNTIME_LOG_CAT1_MIN=0x0300, + //运动 + RUNTIME_LOG_SPORT_MIN=0x0400, + //心率 + RUNTIME_LOG_HEART_MIN=0x0500, + //佩戴 + RUNTIME_LOG_WEAR_MIN=0x0600, + //血氧 + RUNTIME_LOG_OXTGEN_MIN= 0x0700, + //LCD + RUNTIME_LOG_LCD_MIN=0x0800, + //抬腕 + RUNTIME_LOG_RAISE_MIN=0x0900, + //充电 + RUNTIME_LOG_CHARGE_MIN=0x0A00, + //电池电量变化 + RUNTIME_LOG_BATTERY_MIN=0x0B00, + //马达 + RUNTIME_LOG_MOTOR_MIN=0x0C00, + //表盘 + RUNTIME_LOG_DIAL_MIN=0x0D00, + //音乐 + RUNTIME_LOG_MUSIC_MIN=0x0E00, + //铃声 + RUNTIME_LOG_RING_MIN=0x0F00, + //低功耗记录 + RUNTIME_LOG_lOW_POWER_MIN=0x1000, + //录音 + RUNTIME_LOG_RECORD_MIN=0x1100, } runtime_log_cmd_Id; -- 2.17.1