if(m_core_sleep)
uapi_save_runtime_log(RUNTIME_LOG_lOW_POWER_M_SLEEP);
else
- uapi_save_runtime_log(RUNTIME_LOG_lOW_POWER_NO_M_SLEEP);
+ {
+ uapi_save_runtime_log(RUNTIME_LOG_lOW_POWER_NO_M_SLEEP);
+ get_save_runtime_vote_status();
+
+ }
+
last_m_core_sleep=m_core_sleep;
}
if(last_sys_slp!=sys_slp)
{
if(sys_slp)
- uapi_save_runtime_log(RUNTIME_LOG_lOW_POWER_SYS_SLEEP);
+ {
+ uapi_save_runtime_log(RUNTIME_LOG_lOW_POWER_SYS_SLEEP_1);
+ get_save_runtime_vote_status();
+ }
else
- uapi_save_runtime_log(RUNTIME_LOG_lOW_POWER_NO_SYS_SLEEP);
+ uapi_save_runtime_log(RUNTIME_LOG_lOW_POWER_SYS_SLEEP_0);
last_sys_slp=sys_slp;
}
-
-
-
// uapi_save_runtime_log(RUNTIME_LOG_lOW_POWER_MIN|sleep_info->sleep_veto.last_veto_id);
#endif
RUNTIME_LOG_lOW_POWER_MIN = 0x1000,
RUNTIME_LOG_lOW_POWER_M_SLEEP,
RUNTIME_LOG_lOW_POWER_NO_M_SLEEP,
- RUNTIME_LOG_lOW_POWER_SYS_SLEEP,
- RUNTIME_LOG_lOW_POWER_NO_SYS_SLEEP,
+ RUNTIME_LOG_lOW_POWER_SYS_SLEEP_1,//醒来
+ RUNTIME_LOG_lOW_POWER_SYS_SLEEP_0,//睡
//录音
RUNTIME_LOG_RECORD_MIN = 0x1100,
RUNTIME_LOG_RECORD_START, // 0x1101 录音开始
RUNTIME_LOG_MSG_MIN = 0x1200,
//消息显示
RUNTIME_LOG_MSG_SHOW,
+ RUNTIME_LOG_VOTE_ID =0x1300,
} runtime_log_cmd_Id;
#include "battery_service.h"
#include "cywee_hal.h"
#include "bluetooth/include/BluetoothModelC.h"
+#include "custom_save_runtime.h"
errcode_t uapi_create_osThread_custom(app_task_definition_t *task_cfg)
{
return ERRCODE_SUCC;
}
+int get_save_runtime_vote_status(void)
+{
+ uint8_t i;
+ uint8_t flag = 0;
+ pm_veto_t* pm_veto_ptr = pm_veto_get_info();
+
+ PRINT("***************get_vote_status***************\n");
+
+ for (i = 0; i < PM_ID_MAX; i++) {
+ if (pm_veto_ptr->veto_counts.sub_counts[i]) {
+
+ uapi_save_runtime_log(pm_veto_ptr->veto_counts.sub_counts[i]|RUNTIME_LOG_VOTE_ID);
+
+ } else {
+ PRINT("vote_status: %s %d\n", get_pm_id_name(i), pm_veto_ptr->veto_counts.sub_counts[i]);
+ }
+ }
+
+
+ return ERRCODE_SUCC;
+}
/*系统声音设置*/
void uapi_systemVolumeSet(int32_t sounding)
{
/*获取Vote状态*/
errcode_t get_vote_status(char *str,size_t str_size);
+int get_save_runtime_vote_status(void);
+
/**
* @brief 日期格式选项枚举
*/