[状态栏]Can数据状态获取逻辑优化

This commit is contained in:
renwj
2022-05-27 17:00:56 +08:00
parent 86c21ddf07
commit 430328ea7f
21 changed files with 92 additions and 68 deletions

View File

@@ -167,12 +167,21 @@ object CallerAutoPilotStatusListenerManager : CallerBase() {
@Synchronized
fun invokeAutopilotGuardian(guardianInfo: MogoReportMsg.MogoReportMessage?) {
M_AUTOPILOT_STATUS_LISTENERS.forEach {
val tag = it.key
val listener = it.value
autoPilotMessageCode = guardianInfo?.code ?: ""
listener.onAutopilotGuardian(guardianInfo)
}
}
/**
* 工控机与车机连接状态回调
*/
fun invokeAutoPilotIPCStatusChanged(ipcConnectionStatus: Int, reason: String?) {
M_AUTOPILOT_STATUS_LISTENERS.forEach {
val listener = it.value
listener.onAutopilotIpcConnectStatusChanged(ipcConnectionStatus, reason)
}
}
}

View File

@@ -114,13 +114,10 @@ object CallerAutopilotVehicleStateListenerManager : CallerBase() {
return this.timeStamp
}
/**
* 底盘没有返回数据
*/
fun invokeAutopilotNotData(timestamp: Long) {
fun invokeAutopilotDataException(timestamp: Long) {
M_AUTOPILOT_VEHICLE_LISTENERS.forEach{
val listener = it.value
listener.onAutopilotNotData(timestamp)
listener.onAutopilotDataException(timestamp)
}
}
}