From: luozheng <1732036298@qq.com> Date: Tue, 9 Dec 2025 07:58:03 +0000 (+0800) Subject: 解决模组升级时:自动跳转到升级中界面未调用模组升级函数bug X-Git-Url: http://git.snicker.com.cn/css/static/gitweb.css?a=commitdiff_plain;h=a7b3b57823270ab2572da472c07b6803ba14aa31;p=mirrors%2FFD230.git 解决模组升级时:自动跳转到升级中界面未调用模组升级函数bug --- diff --git a/code/sdk/application/wearable/ln/nativeapp/nativeui/ota/src/OtaModel.cpp b/code/sdk/application/wearable/ln/nativeapp/nativeui/ota/src/OtaModel.cpp index 4ad9f988c..8ee7654d2 100644 --- a/code/sdk/application/wearable/ln/nativeapp/nativeui/ota/src/OtaModel.cpp +++ b/code/sdk/application/wearable/ln/nativeapp/nativeui/ota/src/OtaModel.cpp @@ -257,7 +257,15 @@ namespace OHOS // 跳转到升级中界面 if (OtaView::GetInstance()) { - do_ln_http_server_send_data(LN_HTTP_SERVICE_CMD_OTA_DOWNLOAD, NULL, 0); + std::string cat1_pyver = uapi_dev_runtime_get_cat1_pyver(); + if(cat1_pyver == "PY_SRV_V27") + { + do_ln_http_server_send_data(LN_HTTP_SERVICE_CMD_OTA_GET_TASK_CAT1_RUN, NULL, 0); + } + else + { + do_ln_http_server_send_data(LN_HTTP_SERVICE_CMD_OTA_DOWNLOAD, NULL, 0); + } OtaView::GetInstance()->ChangeView(OtaView::OTA_VIEW_COUNTDOWN, OtaView::OTA_VIEW_UPDATING); } diff --git a/code/sdk/zhihui/4g/cat1Service/Service/cat1_tcpServer.c b/code/sdk/zhihui/4g/cat1Service/Service/cat1_tcpServer.c index ce0133f34..f8cf2c54b 100644 --- a/code/sdk/zhihui/4g/cat1Service/Service/cat1_tcpServer.c +++ b/code/sdk/zhihui/4g/cat1Service/Service/cat1_tcpServer.c @@ -1371,15 +1371,19 @@ static osTimerId_t modem_ota_timer=NULL; static uint16 mode_ota_count=0; +#ifdef BOARD_LEINIAO #include "ln_api_interface.h" +#endif static void modem_ota_timer_CallBack(int data_tmp) { + printf("modem_ota_timer_CallBack mode_ota_count:%d\n",mode_ota_count); if(old_model_ver!=g_py_ver) { uint8_t TRANSMIT_DATA=TRANS_FREE; #ifdef BOARD_LEINIAO push_ota_status(OTA_UI_STATUS_SUCCESS); + LOS_Msleep(1000); shutdown_reboot_prejobs(REBOOT_TYPE); #else CustomEventPublish(TOPIC_EVENT_BLE_TRANSMIT,&TRANSMIT_DATA,1);