ad upgrade
ad upgrade confirm and cancel instructions issued
This commit is contained in:
@@ -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());
|
||||
}
|
||||
}
|
||||
@@ -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)){
|
||||
|
||||
@@ -77,4 +77,14 @@ public interface IMoGoAutopilotProvider extends IMoGoFunctionServerProvider {
|
||||
* 重启
|
||||
*/
|
||||
void setIPCReboot();
|
||||
|
||||
/**
|
||||
* 工控机升级确认
|
||||
*/
|
||||
void setIPCUpgradeAffirm();
|
||||
|
||||
/**
|
||||
* 工控机升级取消
|
||||
*/
|
||||
void setIPCUpgradeCancel();
|
||||
}
|
||||
|
||||
@@ -86,4 +86,19 @@ object CallerAutoPilotManager {
|
||||
fun setIPCReboot() {
|
||||
providerApi?.setIPCReboot()
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置工控机升级确认
|
||||
*/
|
||||
fun setIPCUpgradeAffirm(){
|
||||
providerApi?.setIPCUpgradeAffirm()
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置工控机升级取消
|
||||
*/
|
||||
fun setIPCUpgradeCancel(){
|
||||
providerApi?.setIPCUpgradeCancel()
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user