From 19b45ff635b5d54d030c58038aea6ded63010c55 Mon Sep 17 00:00:00 2001 From: hcj_ <1224667075@qq.com> Date: Fri, 10 May 2024 17:31:22 +0800 Subject: [PATCH] =?utf8?q?=E9=87=8D=E6=9E=84OTA=E5=8D=87=E7=BA=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- .../systemupdate/src/SystemUpdateView.cpp | 28 +++++++++++++++++-- .../drivers/peripheral/utils/custom_utils.c | 2 +- 2 files changed, 26 insertions(+), 4 deletions(-) diff --git a/code/sdk/application/wearable/fd230app/nativeui/systemupdate/src/SystemUpdateView.cpp b/code/sdk/application/wearable/fd230app/nativeui/systemupdate/src/SystemUpdateView.cpp index ffc79754a..0262dde94 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/systemupdate/src/SystemUpdateView.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/systemupdate/src/SystemUpdateView.cpp @@ -31,7 +31,7 @@ #include "cat1_ctl.h" #include "cat1_server_hal.h" -#define OTA_UPDATA_TEST 1 +#define OTA_UPDATA_TEST 0 namespace OHOS { @@ -283,7 +283,7 @@ namespace OHOS uint32_t version_len=128; uapi_get_buildversion((uint8_t*)version_buf,version_len); #if OTA_UPDATA_TEST - sprintf((char *)uri,JSON_URL,"860132060413978","V1.1_20240508_211447"); + sprintf((char *)uri,JSON_URL,"860132060413978","V1.1_20240507_185224"); #else sprintf((char *)uri,JSON_URL,imei_str,version_buf); #endif @@ -348,6 +348,23 @@ namespace OHOS delete TryAgainLaterButton; TryAgainLaterButton = nullptr; + delete updatasider; + updatasider = nullptr; + + delete IMEIlabel; + IMEIlabel = nullptr; + + delete CATlabel; + CATlabel = nullptr; + + + delete NEWMSGLabel; + NEWMSGLabel = nullptr; + + delete NEWVersionIdLabel; + NEWVersionIdLabel = nullptr; + + delete SystemUpdateScrollView; SystemUpdateScrollView = nullptr; @@ -386,7 +403,12 @@ namespace OHOS break; case OTA_BUTTON_GET_ABLE_UPDTAT: SystemUpdateModel ::GetInstance() .report_jsonString_write(); - //uaip_cmd_update_request(); + #if OTA_UPDATA_TEST + uapi_reboot_device(); + #else + uaip_cmd_update_request(); + #endif + break; default: diff --git a/code/sdk/drivers/peripheral/utils/custom_utils.c b/code/sdk/drivers/peripheral/utils/custom_utils.c index 3de235e39..842114fc4 100644 --- a/code/sdk/drivers/peripheral/utils/custom_utils.c +++ b/code/sdk/drivers/peripheral/utils/custom_utils.c @@ -322,7 +322,7 @@ void startup_post_init_task(void) LOS_Msleep(5000); addressbookToRead(NULL); - // up_report_timer(); + up_report_timer(); if ( poweron_cat1_on_bootup_flag() ) { PRINT("PowerOn Cat1 !\r\n"); -- 2.17.1