[6.3.0][Feat]工控机连接状态加入预警扩展栏中

This commit is contained in:
chenfufeng
2024-02-29 15:39:32 +08:00
parent 2702cbc173
commit 799c2c1da7
5 changed files with 83 additions and 6 deletions

View File

@@ -62,11 +62,16 @@ object CallerAutoPilotStatusListenerManager : CallerBase<IMoGoAutopilotStatusLis
@Volatile
private var autoPilotMessageContent: String = ""
private var status: AdasConstants.IpcConnectionStatus? = null
override fun doSomeAfterAddListener(tag: String, listener: IMoGoAutopilotStatusListener) {
listener.onAutopilotStatusResponse(autopilotState)
if(dockerV.isNotEmpty()){
listener.onAutopilotDockerInfo(dockerV)
}
if (status != null) {
listener.onAutopilotIpcConnectStatusChanged(status!!, "")
}
}
/**
@@ -202,6 +207,7 @@ object CallerAutoPilotStatusListenerManager : CallerBase<IMoGoAutopilotStatusLis
* 工控机与车机连接状态回调
*/
fun invokeAutoPilotIPCStatusChanged(status: AdasConstants.IpcConnectionStatus, reason: String?) {
this.status = status
M_LISTENERS.forEach {
val listener = it.value
listener.onAutopilotIpcConnectStatusChanged(status, reason)