工控机升级
调整工控机升级信息数据来源,改由云端获取,去掉之前由工控机获取数据逻辑
This commit is contained in:
@@ -31,11 +31,7 @@ import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotIdentifyListen
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotPlanningListenerManager.invokeAutopilotRotting
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotPlanningListenerManager.invokeAutopilotTrajectory
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotVehicleStateListenerManager
|
||||
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager.showAdUpgradeStatus
|
||||
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager.showDockerRebootResult
|
||||
import com.mogo.eagle.core.function.call.map.CallerMapUIServiceManager
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_ADAS_IMPL
|
||||
import com.zhidao.support.adas.high.AdasManager
|
||||
import com.zhidao.support.adas.high.OnAdasListener
|
||||
import com.zhidao.support.adas.high.bean.IPCUpgradeStateInfo
|
||||
@@ -327,23 +323,7 @@ class MoGoAdasListenerImpl : OnAdasListener {
|
||||
}
|
||||
|
||||
override fun onUpgradeStateInfo(info: IPCUpgradeStateInfo) {
|
||||
if (info != null) {
|
||||
CallerLogger.d(
|
||||
"$M_ADAS_IMPL$TAG", "onUpgradeStateInfo " +
|
||||
" upgrade mode=" + info.upgradeMode +
|
||||
" download status=" + info.downloadStatus +
|
||||
" download progress current=" + info.progress.current +
|
||||
" download progress total=" + info.progress.total +
|
||||
" download version=" + info.images +
|
||||
" upgrade status=" + info.upgradeStatus
|
||||
)
|
||||
showAdUpgradeStatus(
|
||||
info.upgradeMode, info.downloadStatus, info.progress.current,
|
||||
info.progress.total, info.images, info.upgradeStatus
|
||||
)
|
||||
} else {
|
||||
CallerLogger.w("$M_ADAS_IMPL$TAG", "onUpgradeStateInfo : upgrade state info is null")
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// override fun onSSHResult(info: com.zhidao.adas.client.ssh.SSHResult?) {
|
||||
|
||||
@@ -950,60 +950,6 @@ class MoGoHmiFragment : MvpFragment<MoGoHmiContract.View?, HmiPresenter?>(),
|
||||
HmiBuildConfig.isShowSnBindingView = isOpen
|
||||
}
|
||||
|
||||
/**
|
||||
* 展示工控机下载、升级状态信息
|
||||
* @param upgradeMode 升级模式(提示升级、静默升级)
|
||||
* @param downloadStatus 下载状态
|
||||
* @param currentProgress 当前已经下载包体大小
|
||||
* @param totalProgress 下载包体总大小
|
||||
* @param downloadVersion 下载版本
|
||||
* @param upgradeStatus 升级状态
|
||||
*/
|
||||
override fun showAdUpgradeStatus(
|
||||
upgradeMode: Int,
|
||||
downloadStatus: Int,
|
||||
currentProgress: Int,
|
||||
totalProgress: Int,
|
||||
downloadVersion: String,
|
||||
upgradeStatus: Int
|
||||
) {
|
||||
ThreadUtils.runOnUiThread {
|
||||
val tipsView = upgradeTipsView?.invoke()
|
||||
//如果工控机处于“下载中”、“可升级(下载完成)”、“升级中”、“升级失败”状态时,工具箱入口显示红色角标
|
||||
if (AdUpgradeStateHelper.showUpgradeTips(downloadStatus, upgradeStatus)) {
|
||||
if (HmiBuildConfig.isShowUpgradeTipsView) {
|
||||
viewUpgradeTips?.visibility = View.VISIBLE
|
||||
} else {
|
||||
tipsView?.let {
|
||||
it.visibility = View.VISIBLE
|
||||
}
|
||||
}
|
||||
} else {
|
||||
viewUpgradeTips?.visibility = View.GONE
|
||||
tipsView?.let {
|
||||
it.visibility = View.GONE
|
||||
}
|
||||
}
|
||||
//将状态同步到工具箱
|
||||
toolsView?.showAdUpgradeStatus(
|
||||
upgradeMode,
|
||||
downloadStatus,
|
||||
currentProgress,
|
||||
totalProgress,
|
||||
downloadVersion,
|
||||
upgradeStatus
|
||||
)
|
||||
//将状态同步到调试窗
|
||||
mDebugSettingView?.setAdUpgradeInfo(
|
||||
upgradeMode,
|
||||
downloadStatus,
|
||||
currentProgress,
|
||||
totalProgress,
|
||||
downloadVersion,
|
||||
upgradeStatus)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 工控机监控节点上报
|
||||
|
||||
@@ -203,17 +203,6 @@ interface IMoGoWaringProvider : IMoGoHmiViewProxy {
|
||||
*/
|
||||
fun showModifyBindingcarDialog()
|
||||
|
||||
/**
|
||||
* 展示工控机下载、升级状态信息
|
||||
* @param upgradeMode 升级模式(提示升级、静默升级)
|
||||
* @param downloadStatus 下载状态
|
||||
* @param currentProgress 当前已经下载包体大小
|
||||
* @param totalProgress 下载包体总大小
|
||||
* @param downloadVersion 下载版本
|
||||
* @param upgradeStatus 升级状态
|
||||
*/
|
||||
fun showAdUpgradeStatus(upgradeMode: Int, downloadStatus: Int, currentProgress: Int, totalProgress: Int, downloadVersion: String, upgradeStatus: Int)
|
||||
|
||||
/**
|
||||
*注册工控机升级提示圆点View的回调
|
||||
* @param 提示圆点View
|
||||
|
||||
@@ -279,20 +279,6 @@ object CallerHmiManager : CallerBase() {
|
||||
waringProviderApi?.hideToolsView()
|
||||
}
|
||||
|
||||
/**
|
||||
* 展示工控机下载、升级状态信息
|
||||
* @param upgradeMode 升级模式(提示升级、静默升级)
|
||||
* @param downloadStatus 下载状态
|
||||
* @param currentProgress 当前已经下载包体大小
|
||||
* @param totalProgress 下载包体总大小
|
||||
* @param downloadVersion 下载版本
|
||||
* @param upgradeStatus 升级状态
|
||||
*/
|
||||
fun showAdUpgradeStatus(upgradeMode : Int, downloadStatus : Int,currentProgress : Int,totalProgress : Int
|
||||
,downloadVersion : String,upgradeStatus : Int){
|
||||
waringProviderApi?.showAdUpgradeStatus(upgradeMode,downloadStatus, currentProgress, totalProgress, downloadVersion, upgradeStatus)
|
||||
}
|
||||
|
||||
/**
|
||||
*注册工控机升级提示圆点View的回调
|
||||
* @param 提示圆点View
|
||||
|
||||
Reference in New Issue
Block a user