[8.2.0]OTA超时查询时间改为30分钟+更改超时提示文案

This commit is contained in:
xuxinchao
2025-08-14 19:10:10 +08:00
parent 86b20e4c5c
commit 48fe09c8fe
6 changed files with 22 additions and 17 deletions

View File

@@ -55,27 +55,27 @@ object OTAUpgradeManager: IMoGoAutopilotStatusListener, IDataCenterBizListener,
override fun handleMessage(msg: Message) {
super.handleMessage(msg)
if(msg.what == 1){
if(responseTimeoutNum<40){
if(responseTimeoutNum<60){
responseTimeoutNum++
//30秒没有收到OTA升级推送主动进行查询
Log.i(TAG,"30秒没有收到OTA升级推送主动进行查询")
CallerAutoPilotControlManager.sendSsmFuncOtaStatusQuery(OTAUpgradeConfig.otaToken)
this.sendEmptyMessageDelayed(1,30000)
}else{
Log.i(TAG,"20分钟没有收到OTA升级推送置为失败")
Log.i(TAG,"30分钟没有收到OTA升级推送置为失败")
CallerHmiManager.showOTADownloadStatusDialog(false, emptyList())
CallerHmiManager.showOTAResultDialog(isShow = true, result = false)
CallerHmiManager.showOTAResultDialog(isShow = true, result = false,true)
}
}else if(msg.what == 2){
Log.i(TAG,"司机屏弹窗提示用车人执行车辆下电操作")
//如果OTA升级弹窗没有点击关闭则自动关闭
CallerHmiManager.showOTAResultDialog(isShow = false, result = true)
CallerHmiManager.showOTAResultDialog(isShow = false, result = true,false)
//司机屏弹窗提示用车人执行车辆下电操作
CallerHmiManager.showOTAPowerOffFinishDialog()
shouldShowColdStartWindow = true
}else if(msg.what == 3){
//OTA2.0超时查询
if(versionTwoTimeoutNum<40){
if(versionTwoTimeoutNum<60){
versionTwoTimeoutNum++
//30秒没有收到OTA升级推送主动进行查询
Log.i(TAG,"30秒没有收到OTA升级推送主动进行查询")
@@ -87,9 +87,9 @@ object OTAUpgradeManager: IMoGoAutopilotStatusListener, IDataCenterBizListener,
CallerAutoPilotControlManager.sendOtaPadMsgQuery(query.toString())
this.sendEmptyMessageDelayed(3,30000)
}else{
Log.i(TAG,"20分钟没有收到OTA升级推送置为失败")
Log.i(TAG,"30分钟没有收到OTA升级推送置为失败")
CallerHmiManager.showOTADownloadStatusDialog(false, emptyList())
CallerHmiManager.showOTAResultDialog(isShow = true, result = false)
CallerHmiManager.showOTAResultDialog(isShow = true, result = false,true)
}
}else if(msg.what == 4){
if(shouldToast && secondVersionShouldToast){
@@ -405,7 +405,7 @@ object OTAUpgradeManager: IMoGoAutopilotStatusListener, IDataCenterBizListener,
OTAUpgradeConfig.isQuery = false
}else{
CallerHmiManager.showOTADownloadStatusDialog(false,otaUpgradeList)
CallerHmiManager.showOTAResultDialog(true,upgradeResult)
CallerHmiManager.showOTAResultDialog(true,upgradeResult,false)
//升级成功,自动执行优雅停服
if(upgradeResult){
CallerAutoPilotControlManager.sendIpcPowerOff()
@@ -536,7 +536,7 @@ object OTAUpgradeManager: IMoGoAutopilotStatusListener, IDataCenterBizListener,
//升级完成
if(otaStatus == "fail"){
CallerHmiManager.showOTADownloadStatusDialog(false,emptyList())
CallerHmiManager.showOTAResultDialog(isShow = true, result = false)
CallerHmiManager.showOTAResultDialog(isShow = true, result = false,false)
versionTwoTimeoutNum = 0
handler.removeMessages(3)
CallerOTAManager.invokeOtaDownloadStatus(false)
@@ -549,7 +549,7 @@ object OTAUpgradeManager: IMoGoAutopilotStatusListener, IDataCenterBizListener,
handler.sendEmptyMessageDelayed(2,60000)
CallerOTAManager.invokeOtaDownloadStatus(false)
CallerHmiManager.showOTADownloadStatusDialog(false,emptyList())
CallerHmiManager.showOTAResultDialog(isShow = true, result = true)
CallerHmiManager.showOTAResultDialog(isShow = true, result = true,false)
versionTwoTimeoutNum = 0
handler.removeMessages(3)
OTAUpgradeConfig.token = ""

View File

@@ -732,7 +732,7 @@ class MoGoHmiProvider : IMoGoHmiProvider {
* @param isShow 是否展示
* @param result true升级成功 false升级失败
*/
override fun showOTAResultDialog(isShow: Boolean,result: Boolean) {
override fun showOTAResultDialog(isShow: Boolean,result: Boolean,isTimeout: Boolean) {
ThreadUtils.runOnUiThread{
if(isShow){
context?.let{
@@ -742,7 +742,7 @@ class MoGoHmiProvider : IMoGoHmiProvider {
if(otaUpgradeResultDialog?.isShowing == false){
otaUpgradeResultDialog?.show()
}
otaUpgradeResultDialog?.showResult(result)
otaUpgradeResultDialog?.showResult(result,isTimeout)
}
}else{
if(otaUpgradeResultDialog?.isShowing == true){

View File

@@ -40,7 +40,7 @@ class OTAUpgradeResultDialog(context: Context) :
* 展示OTA升级结果弹窗
* @param result true升级成功 false升级失败
*/
fun showResult(result: Boolean){
fun showResult(result: Boolean,isTimeout: Boolean){
if(result){
//升级成功
ivUpgradeResult.setImageDrawable(ResourceUtils.getDrawable(R.drawable.icon_ota_upgrade_success))
@@ -60,7 +60,11 @@ class OTAUpgradeResultDialog(context: Context) :
}else{
//升级失败
ivUpgradeResult.setImageDrawable(ResourceUtils.getDrawable(R.drawable.icon_ota_upgrade_fail))
tvResultContent.text = context.resources.getString(R.string.ota_result_fail)
tvResultContent.text = if(isTimeout){
context.resources.getString(R.string.ota_result_timeout)
}else{
context.resources.getString(R.string.ota_result_fail)
}
tvResultTip.text = context.resources.getString(R.string.ota_result_fail_tip)
//消息盒子和语音提示升级失败结果
CallerMsgBoxManager.saveMsgBox(

View File

@@ -271,6 +271,7 @@
<string name="ota_result_image">OTA升级结果图片示例</string>
<string name="ota_result_success">⻋辆部署任务下载完成</string>
<string name="ota_result_fail">⻋辆部署任务执⾏失败</string>
<string name="ota_result_timeout">车辆部署任务状态查询超时</string>
<string name="ota_result_success_tip">已自动发起优雅停服,%s后可操作车辆下电重启</string>
<string name="ota_result_fail_tip">请联系管理员</string>
<string name="ota_result_close">关闭</string>

View File

@@ -346,7 +346,7 @@ interface IMoGoHmiProvider :IProvider{
* @param isShow 是否展示
* @param result true升级成功 false升级失败
*/
fun showOTAResultDialog(isShow: Boolean,result: Boolean)
fun showOTAResultDialog(isShow: Boolean,result: Boolean,isTimeout: Boolean)
/**
* OTA升级完成且优雅停服完成、需要车辆下电的时候车端告知鹰眼司机屏弹窗提示用车人执行车辆下电操作

View File

@@ -500,8 +500,8 @@ object CallerHmiManager {
* @param isShow 是否展示
* @param result true升级成功 false升级失败
*/
fun showOTAResultDialog(isShow: Boolean,result: Boolean){
hmiProviderApi?.showOTAResultDialog(isShow,result)
fun showOTAResultDialog(isShow: Boolean,result: Boolean,isTimeout: Boolean){
hmiProviderApi?.showOTAResultDialog(isShow,result,isTimeout)
}
/**