[6.9.0]OTA升级检查更新调整

This commit is contained in:
xuxinchao
2024-12-30 19:27:21 +08:00
parent 0336ed238f
commit 183d821fe5
11 changed files with 60 additions and 143 deletions

View File

@@ -16,4 +16,7 @@ object OTAUpgradeConfig {
//是否有订单 true有订单 false没有订单
@JvmField
var inOrder: Boolean = false
//当前SSM版本是否支持OTA升级默认不支持
@JvmField
var supportOTA: Boolean = false
}

View File

@@ -87,16 +87,8 @@ object OTAUpgradeManager: IMoGoAutopilotStatusListener, IDataCenterBizListener,
// 并toast提示“收到车辆部署任务请在车辆空闲时发起升级”
CallerAutoPilotControlManager.sendSsmFuncOtaDownloadResponse(OTAUpgradeConfig.otaToken,SsmInfo.IfUpgrade.DELAY)
ToastUtils.showLong("收到车辆部署任务,请在车辆空闲时发起升级")
//展示OTA升级提示
CallerHmiManager.showOTAUpgradeTipView(true)
}
}else{
//展示OTA升级提示
CallerHmiManager.showOTAUpgradeTipView(true)
}
}else{
//隐藏OTA升级提示
CallerHmiManager.showOTAUpgradeTipView(false)
}
//解析JSON
var upgradeComplete = true
@@ -135,6 +127,9 @@ object OTAUpgradeManager: IMoGoAutopilotStatusListener, IDataCenterBizListener,
//// 状态 0:默认(未开始), 1:下载中, 2:下载完成, 3:升级完成, 4:升级失败
if(productStatus == 0 || productStatus == 1 || productStatus == 2){
upgradeComplete = false
CallerOTAManager.invokeOtaDownloadStatus(true)
}else{
CallerOTAManager.invokeOtaDownloadStatus(false)
}
val otaUpgradeInfo = OtaUpgradeInfo(token, productStatus,failReason,upgradeReason,
@@ -167,13 +162,7 @@ object OTAUpgradeManager: IMoGoAutopilotStatusListener, IDataCenterBizListener,
OTAUpgradeConfig.otaToken = status.otaInfo.otaToken
//触发升级提示
CallerHmiManager.showOTAUpgradeDialog(true)
}else{
//展示OTA升级提示
CallerHmiManager.showOTAUpgradeTipView(true)
}
}else{
//隐藏OTA升级提示
CallerHmiManager.showOTAUpgradeTipView(false)
}
//解析JSON
@@ -213,6 +202,9 @@ object OTAUpgradeManager: IMoGoAutopilotStatusListener, IDataCenterBizListener,
//// 状态 0:默认(未开始), 1:下载中, 2:下载完成, 3:升级完成, 4:升级失败
if(productStatus == 0 || productStatus == 1 || productStatus == 2){
upgradeComplete = false
CallerOTAManager.invokeOtaDownloadStatus(true)
}else{
CallerOTAManager.invokeOtaDownloadStatus(false)
}
if(productStatus == 4){
upgradeResult = false