From: hcj <1224667075@qq.com> Date: Tue, 17 Dec 2024 11:22:38 +0000 (+0800) Subject: 修改运行日志保存获取时间接口 X-Git-Tag: v1.3.113-repair_tp~142 X-Git-Url: http://git.snicker.com.cn/css/static/gitweb.css?a=commitdiff_plain;h=refs%2Fchanges%2F1529%2F1;p=mirrors%2FFD230.git 修改运行日志保存获取时间接口 --- 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;