diff --git a/core/function-impl/mogo-core-function-autopilot/src/main/java/com/mogo/eagle/core/function/autopilot/MoGoAutopilotProvider.kt b/core/function-impl/mogo-core-function-autopilot/src/main/java/com/mogo/eagle/core/function/autopilot/MoGoAutopilotProvider.kt index 44fa2d8028..68ac9a4333 100644 --- a/core/function-impl/mogo-core-function-autopilot/src/main/java/com/mogo/eagle/core/function/autopilot/MoGoAutopilotProvider.kt +++ b/core/function-impl/mogo-core-function-autopilot/src/main/java/com/mogo/eagle/core/function/autopilot/MoGoAutopilotProvider.kt @@ -15,6 +15,7 @@ import com.mogo.eagle.core.utilcode.util.GsonUtils import com.mogo.eagle.core.utilcode.util.LogUtils import com.mogo.eagle.core.utilcode.util.ThreadUtils import com.zhidao.support.adas.high.AdasManager +import com.zhidao.support.adas.high.bean.IPCUpgradeInfo import com.zhidao.support.adas.high.common.CupidLogUtils import java.util.concurrent.TimeUnit @@ -119,4 +120,18 @@ class MoGoAutopilotProvider : override fun recordCause(key: String?, name: String?, id: String?, reason: String?) { AdasManager.getInstance().recordCause(key, name, id, reason) } + + /** + * 工控机升级确认 + */ + override fun setIPCUpgradeAffirm() { + AdasManager.getInstance().sendBaseInfo(IPCUpgradeInfo.affirm()); + } + + /** + * 工控机升级取消 + */ + override fun setIPCUpgradeCancel() { + AdasManager.getInstance().sendBaseInfo(IPCUpgradeInfo.cancel()); + } } \ No newline at end of file diff --git a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/widget/SystemVersionView.kt b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/widget/SystemVersionView.kt index b0f0811599..ce4eb0c206 100644 --- a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/widget/SystemVersionView.kt +++ b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/widget/SystemVersionView.kt @@ -8,6 +8,7 @@ import androidx.constraintlayout.widget.ConstraintLayout import com.mogo.eagle.core.data.autopilot.AdUpgradeStateHelper import com.mogo.eagle.core.data.autopilot.AutopilotStatusInfo import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener +import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotManager import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager import com.mogo.eagle.core.function.hmi.R import com.mogo.eagle.core.function.hmi.ui.tools.AdUpgradeDialog @@ -79,17 +80,14 @@ class SystemVersionView @JvmOverloads constructor( Logger.i(TAG,"upgrade confirm") //设置当前状态为“升级中” AdUpgradeStateHelper.setUpgradeStatus(true) - //TODO -// AdasManager.getInstance().sendBaseInfo(IPCUpgradeInfo.affirm()); + CallerAutoPilotManager.setIPCUpgradeAffirm() } } override fun cancel() { //取消升级 Logger.i(TAG,"upgrade cancel") - //TODO -// AdasManager.getInstance().sendBaseInfo(IPCUpgradeInfo.cancel()); - + CallerAutoPilotManager.setIPCUpgradeCancel() } }) @@ -155,8 +153,7 @@ class SystemVersionView @JvmOverloads constructor( adCircularProgressView?.visibility = View.GONE if(AdUpgradeStateHelper.isQuietUpgradeMode(upgradeMode)){ //如果升级模式为“静默升级”,则下载完成后,调用升级命令进行升级 - //TODO 升级 -// AdasManager.getInstance().sendBaseInfo(IPCUpgradeInfo.affirm()); + CallerAutoPilotManager.setIPCUpgradeAffirm() AdUpgradeStateHelper.setUpgradeStatus(true) } }else if(AdUpgradeStateHelper.isDownloadFailed(downloadStatus)){ diff --git a/core/mogo-core-function-api/src/main/java/com/mogo/eagle/core/function/api/autopilot/IMoGoAutopilotProvider.java b/core/mogo-core-function-api/src/main/java/com/mogo/eagle/core/function/api/autopilot/IMoGoAutopilotProvider.java index e71094f241..dcc9bc9018 100644 --- a/core/mogo-core-function-api/src/main/java/com/mogo/eagle/core/function/api/autopilot/IMoGoAutopilotProvider.java +++ b/core/mogo-core-function-api/src/main/java/com/mogo/eagle/core/function/api/autopilot/IMoGoAutopilotProvider.java @@ -77,4 +77,14 @@ public interface IMoGoAutopilotProvider extends IMoGoFunctionServerProvider { * 重启 */ void setIPCReboot(); + + /** + * 工控机升级确认 + */ + void setIPCUpgradeAffirm(); + + /** + * 工控机升级取消 + */ + void setIPCUpgradeCancel(); } diff --git a/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/autopilot/CallerAutoPilotManager.kt b/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/autopilot/CallerAutoPilotManager.kt index 4a3e046bb1..9e5c3210a0 100644 --- a/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/autopilot/CallerAutoPilotManager.kt +++ b/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/autopilot/CallerAutoPilotManager.kt @@ -86,4 +86,19 @@ object CallerAutoPilotManager { fun setIPCReboot() { providerApi?.setIPCReboot() } + + /** + * 设置工控机升级确认 + */ + fun setIPCUpgradeAffirm(){ + providerApi?.setIPCUpgradeAffirm() + } + + /** + * 设置工控机升级取消 + */ + fun setIPCUpgradeCancel(){ + providerApi?.setIPCUpgradeCancel() + } + } \ No newline at end of file