}
if (RemindIcon2)
{
- RemindIcon2->SetPosition(146, 124, 24, 24);
+ RemindIcon2->SetPosition(147, 124, 24, 24);
RemindIcon2->SetSrc("/user/res/volume_up.bin");
RemindIcon2->SetVisible(true);
}
void ThunderBirdReminderView::scheduleName_task_reminder(const char* scheduleName)
{
+ int currentView = ThunderBirdMainView::GetInstance()->GetCurrentView();
+ int currentSubView = ThunderBirdMainView::GetInstance()->GetCurrentSubView();
+ if(currentView == THUNDERBIRD_REMINDERVIEW && currentSubView == THUNDERBIRD_REMINDERVIEW_TASK_REMINDER)
+ {
+ TextLabel->SetVisible(true);
+ }
if(scheduleName != nullptr && strcmp(scheduleName, "提醒设置成功") == 0)
{
if (RemindButton)
if (RemindIcon)
{
RemindIcon->SetPosition(95, 122, 24, 24);
- RemindIcon->SetSrc("/user/res/completed.bin");
+ RemindIcon->SetSrc("/user/res/delete.bin");
RemindIcon->SetVisible(true);
}
}
}
}
- if(data_len!=SPI_PACKET_DATA_SIZE)
+ if(g_py_ver==28)
{
- http_file_download_notify_complete(1);
+ if(data_len!=SPI_PACKET_DATA_SIZE+4)
+ {
+ http_file_download_notify_complete(1);
+ }
+ }
+ else
+ {
+ if(data_len!=SPI_PACKET_DATA_SIZE)
+ {
+ http_file_download_notify_complete(1);
+ }
}
return 0;
//添加睡眠投票
uapi_ln_add_vote();
- // int ret = uapi_ln_download_file_resume(url, save_path);
- int ret = http_file_download_start(url, save_path, 300*100, 10);
- if (ERRCODE_SUCC != ret)
- {
- for (int i = 1; i <= max_retries; i++)
+ int ret = ERRCODE_FAIL;
+ for (int i = 0; i <= max_retries; i++)
+ {
+ ret = http_file_download_start(url, save_path, 300*1000, 10);
+ if (ERRCODE_SUCC == ret)
{
- WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[DOWNLOAD_RESUME_WITH_RETRY] 重试 %d/%d", i, max_retries);
- // ret = uapi_ln_download_file_resume(url, save_path);
- ret = http_file_download_start(url, save_path, 300*100, 10);
- if (ERRCODE_SUCC == ret)
- {
- WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[DOWNLOAD_RESUME_WITH_RETRY] 重试成功 %d", i);
- break;
- }
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[DOWNLOAD_RESUME_WITH_RETRY] 下载成功 %d", i);
+ break;
}
+ else
+ {
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[DOWNLOAD_RESUME_WITH_RETRY] 下载失败,开始重试");
+ sleep(1);
+ http_file_download_deinit();
+ sleep(1);
+ http_file_download_init(NULL);
+ sleep(1);
+ }
+
}
+
g_ln_is_file_downloading = 0;
//移除睡眠投票
uapi_ln_remove_vote();
// 统计总接收字节数(仅统计实际数据长度,不包括包头)
total_cnt += data_len;
- if(data_len != SPI_PACKET_DATA_SIZE)
+ if(g_py_ver==28)
{
- g_expected_seq = 0;
- pkg_recv_cnt=0;
+ if(data_len != SPI_PACKET_DATA_SIZE+4)
+ {
+ g_expected_seq = 0;
+ pkg_recv_cnt=0;
+ }
+ }
+ else
+ {
+ if(data_len != SPI_PACKET_DATA_SIZE)
+ {
+ g_expected_seq = 0;
+ pkg_recv_cnt=0;
+ }
}
// 调用注册的回调函数处理数据(传递数据部分,不包含包头)