[680][core] 优雅停服后的异常提示优化 收到命令回执后将不在进行消息盒子弹出提示

This commit is contained in:
xinfengkun
2024-11-21 10:22:12 +08:00
parent 0bcfd98242
commit 72c5d68c91
6 changed files with 63 additions and 4 deletions

View File

@@ -32,6 +32,7 @@ import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotControlProvider
import com.mogo.eagle.core.function.api.hmi.view.IViewControlListener.Companion.FUNC_MODE_RAIN
import com.mogo.eagle.core.function.api.map.collect.IMoGoMapDataCollectProvider
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotCarConfigListenerManager
import com.mogo.eagle.core.function.call.autopilot.CallerIpcConnectStateToastManager
import com.mogo.eagle.core.function.call.cloud.CallerCloudCertManager
import com.mogo.eagle.core.function.call.devatools.CallerDevaToolsManager
import com.mogo.eagle.core.function.call.hmi.CallerHmiViewControlListenerManager
@@ -1022,8 +1023,10 @@ class MoGoAutopilotControlProvider :
nodeAliasCode = CHAIN_CODE_ADAS_POWER_OFF,
paramIndexes = [-1]
)
override fun sendIpcPowerOff() : Long{
return AdasManager.getInstance().sendIpcPowerOff()
override fun sendIpcPowerOff(): Long {
val id = AdasManager.getInstance().sendIpcPowerOff()
CallerIpcConnectStateToastManager.powerOffMsgId = id
return id
}
/**

View File

@@ -67,6 +67,7 @@ import com.mogo.eagle.core.function.call.autopilot.CallerChassisStatesListenerMa
import com.mogo.eagle.core.function.call.autopilot.CallerColdStartStateListenerManager
import com.mogo.eagle.core.function.call.autopilot.CallerFaultManagementStateListenerManager
import com.mogo.eagle.core.function.call.autopilot.CallerFsm2024ListenerManager
import com.mogo.eagle.core.function.call.autopilot.CallerIpcConnectStateToastManager
import com.mogo.eagle.core.function.call.autopilot.CallerLocalizationStateListenerManager
import com.mogo.eagle.core.function.call.autopilot.CallerNodeStateListenerManager
import com.mogo.eagle.core.function.call.autopilot.CallerParallelDrivingActionsListenerManager
@@ -1310,6 +1311,7 @@ class MoGoAdasListenerImpl : OnAdasListener {
* @param receivedAck 回执
*/
override fun onReceiveReceivedAck(receivedAck: ReceivedAck) {
CallerIpcConnectStateToastManager.receivedAck(receivedAck)
CallerReceiveReceivedAckListenerManager.invokeReceiveReceivedAck(receivedAck)
if (receivedAck.messageType == MessageType.TYPE_SEND_SET_AUTOPILOT_MODE_REQ ||//设置自动驾驶模式
receivedAck.messageType == MessageType.TYPE_SEND_SET_DEMO_MODE_REQ ||//设置演示模式

View File

@@ -21,6 +21,7 @@ import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotControlManager
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotActionsListenerManager
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotCarConfigListenerManager
import com.mogo.eagle.core.function.call.autopilot.CallerIpcConnectStateToastManager
import com.mogo.eagle.core.function.call.autopilot.CallerParallelDrivingActionsListenerManager
import com.mogo.eagle.core.function.call.cloud.CallerCloudListenerManager
import com.mogo.eagle.core.function.call.msgbox.CallerMsgBoxManager
@@ -32,7 +33,6 @@ import com.mogo.eagle.core.utilcode.util.ToastUtils
import com.zhidao.support.adas.high.AdasManager
import com.zhidao.support.adas.high.OnAdasConnectStatusListener
import com.zhidao.support.adas.high.bean.VersionCompatibility
import com.zhidao.support.adas.high.chain.AdasChain
import com.zhidao.support.adas.high.common.Constants.ENVIRONMENT.DEMO
import com.zhidao.support.adas.high.common.Constants.ENVIRONMENT.DEVELOP
import com.zhidao.support.adas.high.common.Constants.ENVIRONMENT.PRODUCTION
@@ -76,7 +76,9 @@ class MoGoAdasMsgConnectStatusListenerImpl :
}
private fun connectToast(reason: String) {
ToastUtils.showShort(reason)
if (CallerIpcConnectStateToastManager.isToast) {
ToastUtils.showShort(reason)
}
}
private fun resetArgs() {
@@ -122,6 +124,7 @@ class MoGoAdasMsgConnectStatusListenerImpl :
AdasConstants.IpcConnectionStatus.CONNECTED -> {
connectStatusDescribe = "已连接"
CallerLogger.d("$M_D_C$TAG", connectStatusDescribe)
CallerIpcConnectStateToastManager.ipcConnected()
// 初始化自动驾驶状态信息
CallerAutoPilotStatusListenerManager.getAutoPilotStatusInfo().connectIP =
AdasManager.getInstance().ipcConnectedIp