From 78d229cf013c56f9d27ede7d272f54a834aca457 Mon Sep 17 00:00:00 2001 From: xue <2144439972@qq.com> Date: Mon, 15 Dec 2025 19:27:02 +0800 Subject: [PATCH] =?utf8?q?=E4=BF=AE=E5=A4=8D=E4=B8=8B=E8=BD=BD=E9=97=AE?= =?utf8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- .../src/ThunderBirdReminderView.cpp | 10 ++++-- .../Service/http_file_download_client.c | 14 +++++++-- code/sdk/zhihui/leiniao/imsl_ln/ln_api.c | 31 +++++++++++-------- code/sdk/zhihui/utils/custom_spi.c | 17 ++++++++-- 4 files changed, 52 insertions(+), 20 deletions(-) diff --git a/code/sdk/application/wearable/ln/nativeapp/nativeui/thunderbird/src/ThunderBirdReminderView.cpp b/code/sdk/application/wearable/ln/nativeapp/nativeui/thunderbird/src/ThunderBirdReminderView.cpp index c58befde8..879afc0a2 100644 --- a/code/sdk/application/wearable/ln/nativeapp/nativeui/thunderbird/src/ThunderBirdReminderView.cpp +++ b/code/sdk/application/wearable/ln/nativeapp/nativeui/thunderbird/src/ThunderBirdReminderView.cpp @@ -186,7 +186,7 @@ namespace OHOS } if (RemindIcon2) { - RemindIcon2->SetPosition(146, 124, 24, 24); + RemindIcon2->SetPosition(147, 124, 24, 24); RemindIcon2->SetSrc("/user/res/volume_up.bin"); RemindIcon2->SetVisible(true); } @@ -548,6 +548,12 @@ namespace OHOS 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) @@ -578,7 +584,7 @@ namespace OHOS if (RemindIcon) { RemindIcon->SetPosition(95, 122, 24, 24); - RemindIcon->SetSrc("/user/res/completed.bin"); + RemindIcon->SetSrc("/user/res/delete.bin"); RemindIcon->SetVisible(true); } } diff --git a/code/sdk/zhihui/4g/cat1Service/Service/http_file_download_client.c b/code/sdk/zhihui/4g/cat1Service/Service/http_file_download_client.c index 58f6a5820..5ae73c7a1 100644 --- a/code/sdk/zhihui/4g/cat1Service/Service/http_file_download_client.c +++ b/code/sdk/zhihui/4g/cat1Service/Service/http_file_download_client.c @@ -288,9 +288,19 @@ static int http_download_spi_data_callback(const uint8_t *data, uint32_t data_le } } - 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; diff --git a/code/sdk/zhihui/leiniao/imsl_ln/ln_api.c b/code/sdk/zhihui/leiniao/imsl_ln/ln_api.c index f25c625cd..37cfe7cc0 100644 --- a/code/sdk/zhihui/leiniao/imsl_ln/ln_api.c +++ b/code/sdk/zhihui/leiniao/imsl_ln/ln_api.c @@ -694,22 +694,27 @@ int uapi_ln_download_file_resume_with_retry(const char *url, const char *save_pa //添加睡眠投票 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(); diff --git a/code/sdk/zhihui/utils/custom_spi.c b/code/sdk/zhihui/utils/custom_spi.c index 1e79664b3..0830410ed 100644 --- a/code/sdk/zhihui/utils/custom_spi.c +++ b/code/sdk/zhihui/utils/custom_spi.c @@ -315,10 +315,21 @@ static void custom_spi_read_normal(void) // 统计总接收字节数(仅统计实际数据长度,不包括包头) 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; + } } // 调用注册的回调函数处理数据(传递数据部分,不包含包头) -- 2.17.1