NotificationManager::GetInstance()->StopNotify();
}
+ static uint8_t epo_timer_falg=20;
+ void epo_timerCallBack(int data)
+ {
+ //给15s时间,等待EPO文件解压完成,超过15s不管成功与否,都停止通知
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "epo_timerCallBack epo_timer_falg = %d", epo_timer_falg);
+ if(epo_timer_falg<=0)
+ {
+ epo_timer_falg=20;
+ NotificationManager::GetInstance()->StopNotify();
+ }
+ else
+ {
+ //如果EPO文件解压成功,停止通知
+ if(uapi_dev_runtime_get_epo_file_extracted_status() == 1)
+ {
+ NativeAbility::GetInstance().ChangeSlice(VIEW_EPHEMERIS_DOWNLOAD);
+ NotificationManager::GetInstance()->StopNotify();
+ }
+ }
+ epo_timer_falg--;
+ }
+
void creat_down_OTA()
osTimerStop(transmitting_timer);
osTimerDelete(transmitting_timer);
transmitting_timer = NULL;
+ epo_timer_falg=20;
}
- transmitting_timer = osTimerNew((osTimerFunc_t)dialtimerCallBack, osTimerPeriodic, NULL, NULL);
- tick =3000;// osMs2Tick(1000);
+ transmitting_timer = osTimerNew((osTimerFunc_t)epo_timerCallBack, osTimerPeriodic, NULL, NULL);
+ tick =1000;// osMs2Tick(1000);
retTimer = osTimerStart(transmitting_timer, tick);
if (retTimer != osOK && transmitting_timer != NULL) {
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP,"StartCallTimer osTimerStart failed, ret = %lx!!", retTimer);
UIViewGroup_transmitting->RemoveAll();
}
uapi_dev_runtime_set_transmitting_status(1);
- printf("Transmitting_falg:%d",Transmitting_falg);
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "Transmitting_falg:%d",Transmitting_falg);
#ifdef SUPPORT_BLE_SERVICE
switch (Transmitting_falg)
{
if (extract_ret == ERRCODE_SUCC)
{
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[handle_epo_file_decompress] EPO lzma file extracted successfully\n");
+ // 设置EPO文件解压状态为成功
+ uapi_dev_runtime_set_epo_file_extracted_status(1);
// 解压成功后删除lzma文件
remove(lzma_file_path);
return ERRCODE_SUCC;
else
{
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[handle_epo_file_decompress] Failed to extract EPO lzma file, ret=0x%X\n", extract_ret);
+ // 设置EPO文件解压状态为失败
+ uapi_dev_runtime_set_epo_file_extracted_status(0);
return ERRCODE_FAIL;
}
}
bt_runtime_status_t bt_runtime;
char current_dial_name[32];
char current_epo_file_path[128]; // EPO文件完整路径
+ uint8_t epo_file_extracted_status;//EPO文件解压状态 0 未解压, 1 解压成功
uint8_t time_hour_show_model;
uint8_t sleep_monitoring_status;//睡眠监测
uint8_t sleep_status;//睡眠状态
{
return (char*)&(g_runtime.current_epo_file_path[0]);
}
+
+/**
+ * 设置 EPO 文件解压状态
+*/
+void uapi_dev_runtime_set_epo_file_extracted_status(uint8_t status)
+{
+ g_runtime.epo_file_extracted_status = status;
+}
+
+/**
+ * 获取 EPO 文件解压状态
+*/
+uint8_t uapi_dev_runtime_get_epo_file_extracted_status(void)
+{
+ return g_runtime.epo_file_extracted_status;
+}
+
+
void uapi_dev_runtime_set_bt_powerstat(uint8_t stat)
{
g_runtime.bt_runtime.bt_powerOn = stat;