From a31e4c44607a3d07d2e83eb1d92e593591594c22 Mon Sep 17 00:00:00 2001 From: luozheng <1732036298@qq.com> Date: Mon, 8 Dec 2025 22:46:23 +0800 Subject: [PATCH] =?utf8?q?=E6=9A=82=E6=97=B6=E5=B1=8F=E8=94=BDota=E4=B8=8A?= =?utf8?q?=E6=8A=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- code/sdk/zhihui/leiniao/imsl_ln/ln_api_ota.c | 12 ++++++------ code/sdk/zhihui/utils/custom_spi.c | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/code/sdk/zhihui/leiniao/imsl_ln/ln_api_ota.c b/code/sdk/zhihui/leiniao/imsl_ln/ln_api_ota.c index efab4ec93..88ffc8e60 100644 --- a/code/sdk/zhihui/leiniao/imsl_ln/ln_api_ota.c +++ b/code/sdk/zhihui/leiniao/imsl_ln/ln_api_ota.c @@ -89,11 +89,11 @@ static void ln_ota_handle_download_msg(const OtaDownloadMsg *msg) WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP,"[OTA_DOWNLOAD] 下载进度: %d%%", msg->progress); push_ota_progress(msg->progress); /* 上报升级进度 */ - if (g_ln_last_update_id && g_ln_last_update_id[0] != '\0') { - char progress_msg[128]; - snprintf(progress_msg, sizeof(progress_msg), "升级进度%d%%", msg->progress); - ln_ws_send_device_upgrade_status_report(g_ln_last_update_id, "UPGRADING", msg->progress, progress_msg); - } + // if (g_ln_last_update_id && g_ln_last_update_id[0] != '\0') { + // char progress_msg[128]; + // snprintf(progress_msg, sizeof(progress_msg), "升级进度%d%%", msg->progress); + // ln_ws_send_device_upgrade_status_report(g_ln_last_update_id, "UPGRADING", msg->progress, progress_msg); + // } break; case OTA_DOWNLOAD_STATUS_COMPLETED: WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP,"[OTA_DOWNLOAD] 下载完成,文件路径: %s", msg->file_path); @@ -632,7 +632,7 @@ end: return ERRCODE_SUCC; } -#if 0 +#if 1 /* 下载进度回调函数 */ static int ln_ota_download_progress_callback(const uint8_t *data, uint32_t data_len, uint32_t packet_num) { diff --git a/code/sdk/zhihui/utils/custom_spi.c b/code/sdk/zhihui/utils/custom_spi.c index 093057fa3..962c09b8f 100644 --- a/code/sdk/zhihui/utils/custom_spi.c +++ b/code/sdk/zhihui/utils/custom_spi.c @@ -82,8 +82,8 @@ void custom_spi_read(void) // 统计总接收字节数(仅统计实际数据长度,不包括包头) total_cnt += data_len; - printf("SPI packet #%u: data_len=%u, total_cnt=%u, rx_bytes=%u\n", - pkg_recv_cnt, data_len, total_cnt, spi_data.rx_bytes); + // printf("SPI packet #%u: data_len=%u, total_cnt=%u, rx_bytes=%u\n", + // pkg_recv_cnt, data_len, total_cnt, spi_data.rx_bytes); // 调用注册的回调函数处理数据(传递数据部分,不包含包头) if (g_spi_data_callback != NULL) { -- 2.17.1