From: hcj_ <1224667075@qq.com> Date: Fri, 10 May 2024 09:31:22 +0000 (+0800) Subject: 重构OTA升级 X-Git-Tag: release_V1.2.70_20241020_135402~1113^2~6 X-Git-Url: http://git.snicker.com.cn/?a=commitdiff_plain;h=19b45ff635b5d54d030c58038aea6ded63010c55;p=mirrors%2FFD230.git 重构OTA升级 --- 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");