[600][adas][data-center]SSM定频接入;能否启动自驾兼容老版本;以及新版本、FSM、不同车型的兼容、不同域控版本兼容;处理数据中心能否启动自驾管理类 初始化调用获取域控连接状态导致的Netty重复初始化问题
This commit is contained in:
@@ -7,6 +7,7 @@ import com.mogo.eagle.core.function.call.base.CallerBase
|
||||
import com.mogo.eagle.core.utilcode.util.GsonUtils
|
||||
import mogo.telematics.pad.MessagePad
|
||||
import mogo_msg.MogoReportMsg
|
||||
import system_master.SsmInfo
|
||||
import system_master.SystemStatusInfo
|
||||
import kotlin.properties.Delegates
|
||||
|
||||
@@ -207,6 +208,19 @@ object CallerAutoPilotStatusListenerManager : CallerBase<IMoGoAutopilotStatusLis
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 定频SSM
|
||||
* 老版本 SSM(SystemStatusInfo.StatusInfo) HQ、M1 MAP350开始弃用,其他车型MAP360开始弃用
|
||||
*/
|
||||
fun invokeSystemStatus(statusInf: SsmInfo.SsmStatusInf?) {
|
||||
statusInf?.also {
|
||||
M_LISTENERS.forEach { itx ->
|
||||
val listener = itx.value
|
||||
listener.onSystemStatus(it)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新自动驾驶控制参数,结束自动驾驶时候需要更新为null,且更新时候同时触发onAutopilotStatusResponse回调
|
||||
*/
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
package com.mogo.eagle.core.function.call.autopilot
|
||||
|
||||
import android.util.Log
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotActionsListener
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotControlManager.isConnected
|
||||
import com.mogo.eagle.core.function.call.base.CallerBase
|
||||
import com.zhjt.mogo.adas.data.bean.UnableAutopilotReason
|
||||
|
||||
@@ -17,10 +15,9 @@ object CallerAutopilotActionsListenerManager : CallerBase<IMoGoAutopilotActionsL
|
||||
private var unableAutopilotReasons: ArrayList<UnableAutopilotReason>? = null
|
||||
|
||||
init {
|
||||
// isConnected = isConnected() //TODO 重复初始
|
||||
isAutopilotAbility = false
|
||||
unableAutopilotReasons = disconnectedReason()
|
||||
printLog("初始化")
|
||||
// printLog("初始化")
|
||||
}
|
||||
|
||||
private fun disconnectedReason(): ArrayList<UnableAutopilotReason> {
|
||||
@@ -50,7 +47,7 @@ object CallerAutopilotActionsListenerManager : CallerBase<IMoGoAutopilotActionsL
|
||||
this.isAutopilotAbility = isConnected
|
||||
unableAutopilotReasons = if (isConnected) null else disconnectedReason()
|
||||
notification()
|
||||
printLog("更新数据 连接状态变更")
|
||||
// printLog("更新数据 连接状态变更")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -66,23 +63,23 @@ object CallerAutopilotActionsListenerManager : CallerBase<IMoGoAutopilotActionsL
|
||||
this.unableAutopilotReasons?.let { old ->
|
||||
old.sortWith(compareBy(UnableAutopilotReason::hashCode));
|
||||
isEquals = onw.toTypedArray() contentEquals old.toTypedArray()
|
||||
Log.i(
|
||||
"ddd",
|
||||
"都不为null时=${isEquals}=${this.isAutopilotAbility} ${(if (this.unableAutopilotReasons == null) null else this.unableAutopilotReasons.toString())}"
|
||||
)
|
||||
// Log.i(
|
||||
// "ddd",
|
||||
// "都不为null时=${isEquals}=${this.isAutopilotAbility} ${(if (this.unableAutopilotReasons == null) null else this.unableAutopilotReasons.toString())}"
|
||||
// )
|
||||
}
|
||||
}
|
||||
} else isEquals =
|
||||
!(unableAutopilotReasons != null || this.unableAutopilotReasons != null)
|
||||
Log.i(
|
||||
"ddd",
|
||||
" 两个List是否相同=${isEquals} 新是否能启动自驾=${isAutopilotAbility} 老是否能启动自驾=${this.isAutopilotAbility} 新List是否为空=${unableAutopilotReasons == null} 老List是否为空=${this.unableAutopilotReasons == null}"
|
||||
)
|
||||
// Log.i(
|
||||
// "ddd",
|
||||
// " 两个List是否相同=${isEquals} 新是否能启动自驾=${isAutopilotAbility} 老是否能启动自驾=${this.isAutopilotAbility} 新List是否为空=${unableAutopilotReasons == null} 老List是否为空=${this.unableAutopilotReasons == null}"
|
||||
// )
|
||||
if (this.isAutopilotAbility != isAutopilotAbility || !isEquals) {
|
||||
this.isAutopilotAbility = isAutopilotAbility
|
||||
this.unableAutopilotReasons = unableAutopilotReasons
|
||||
notification()
|
||||
printLog("更新数据")
|
||||
// printLog("更新数据")
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -94,10 +91,10 @@ object CallerAutopilotActionsListenerManager : CallerBase<IMoGoAutopilotActionsL
|
||||
}
|
||||
}
|
||||
|
||||
fun printLog(tag: String) {
|
||||
Log.i(
|
||||
"ddd",
|
||||
"${tag}=${isAutopilotAbility} ${(if (unableAutopilotReasons == null) null else unableAutopilotReasons.toString())}"
|
||||
)
|
||||
}
|
||||
// fun printLog(tag: String) {
|
||||
// Log.i(
|
||||
// "xfk",
|
||||
// "${tag}=${isAutopilotAbility} ${(if (unableAutopilotReasons == null) null else unableAutopilotReasons.toString())}"
|
||||
// )
|
||||
// }
|
||||
}
|
||||
Reference in New Issue
Block a user