Merge branch 'dev_robotaxi-d_231205_6.2.6' into dev_robotaxi-d_231218_6.2.6
# Conflicts: # OCH/bus/passenger/src/jinlvvan/java/com/mogo/och/bus/passenger/MogoOCHBusPassenger.java
This commit is contained in:
@@ -60,6 +60,7 @@ import com.zhjt.mogo.adas.data.bean.AdasParam
|
||||
import com.zhidao.support.adas.high.common.ProtocolStatus
|
||||
import com.zhjt.mogo.adas.data.AiCloudTask
|
||||
import com.zhjt.mogo.adas.data.bean.AutopilotStatistics
|
||||
import com.zhjt.mogo.adas.data.bean.UnableLaunchData
|
||||
import com.zhjt.mogo.adas.data.bean.UnableLaunchReason
|
||||
import com.zhjt.mogo.adas.data.sweeper.bootable.SweeperBootable
|
||||
import com.zhjt.mogo.adas.data.sweeper.task.SweeperTask
|
||||
@@ -914,12 +915,13 @@ class MoGoAdasListenerImpl : OnAdasListener {
|
||||
*/
|
||||
override fun onAutopilotAbility(
|
||||
isAutopilotAbility: Boolean,
|
||||
unableLaunchData: UnableLaunchData,
|
||||
unableAutopilotReasons: ArrayList<UnableLaunchReason>?
|
||||
) {
|
||||
if (unableAutopilotReasons != null && unableAutopilotReasons.size > 0) {
|
||||
autopilotAbilityCheck(isAutopilotAbility, unableAutopilotReasons.toString())
|
||||
autopilotAbilityCheck(isAutopilotAbility, unableAutopilotReasons.toString(), unableLaunchData)
|
||||
}
|
||||
invokeAutopilotAbility(isAutopilotAbility, unableAutopilotReasons)
|
||||
invokeAutopilotAbility(isAutopilotAbility, unableLaunchData, unableAutopilotReasons)
|
||||
}
|
||||
|
||||
override fun onParallelDrivingAbility(
|
||||
@@ -934,7 +936,7 @@ class MoGoAdasListenerImpl : OnAdasListener {
|
||||
nodeAliasCode = CHAIN_CODE_ADAS_ABILITY,
|
||||
paramIndexes = [0, 1]
|
||||
)
|
||||
private fun autopilotAbilityCheck(isAutopilotAbility: Boolean, reason: String) {
|
||||
private fun autopilotAbilityCheck(isAutopilotAbility: Boolean, reason: String, unableLaunchData: UnableLaunchData) {
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.mogo.eagle.core.function.api.autopilot
|
||||
|
||||
import com.zhjt.mogo.adas.data.bean.UnableLaunchData
|
||||
import com.zhjt.mogo.adas.data.bean.UnableLaunchReason
|
||||
|
||||
|
||||
@@ -8,5 +9,5 @@ import com.zhjt.mogo.adas.data.bean.UnableLaunchReason
|
||||
*/
|
||||
interface IMoGoAutopilotActionsListener {
|
||||
|
||||
fun onAutopilotAbility(isAutopilotAbility: Boolean, unableAutopilotReasons: ArrayList<UnableLaunchReason>?)
|
||||
fun onAutopilotAbility(isAutopilotAbility: Boolean, unableLaunchData: UnableLaunchData?, unableAutopilotReasons: ArrayList<UnableLaunchReason>?)
|
||||
}
|
||||
@@ -2,6 +2,7 @@ package com.mogo.eagle.core.function.call.autopilot
|
||||
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotActionsListener
|
||||
import com.mogo.eagle.core.function.call.base.CallerBase
|
||||
import com.zhjt.mogo.adas.data.bean.UnableLaunchData
|
||||
import com.zhjt.mogo.adas.data.bean.UnableLaunchReason
|
||||
|
||||
|
||||
@@ -11,7 +12,14 @@ import com.zhjt.mogo.adas.data.bean.UnableLaunchReason
|
||||
object CallerAutopilotActionsListenerManager : CallerBase<IMoGoAutopilotActionsListener>() {
|
||||
@Volatile
|
||||
private var isConnected = false
|
||||
|
||||
@Volatile
|
||||
private var isAutopilotAbility: Boolean = false
|
||||
|
||||
@Volatile
|
||||
private var unableLaunchData: UnableLaunchData? = null
|
||||
|
||||
@Volatile
|
||||
private var unableAutopilotReasons: ArrayList<UnableLaunchReason>? = null
|
||||
|
||||
init {
|
||||
@@ -38,6 +46,15 @@ object CallerAutopilotActionsListenerManager : CallerBase<IMoGoAutopilotActionsL
|
||||
return isAutopilotAbility
|
||||
}
|
||||
|
||||
//获取域控发的原始数据,目前包括新老SSM和FM数据
|
||||
fun getOriginalData(): String {
|
||||
return unableLaunchData?.json ?: ""
|
||||
}
|
||||
|
||||
fun getUnableLaunchData(): UnableLaunchData? {
|
||||
return unableLaunchData
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取不能启动自驾的原因
|
||||
* null:表示没有任何原因证,证明isAutopilotAbility为true
|
||||
@@ -57,7 +74,9 @@ object CallerAutopilotActionsListenerManager : CallerBase<IMoGoAutopilotActionsL
|
||||
|
||||
@Synchronized
|
||||
fun invokeAutopilotAbility(
|
||||
isAutopilotAbility: Boolean, unableAutopilotReasons: ArrayList<UnableLaunchReason>?
|
||||
isAutopilotAbility: Boolean,
|
||||
unableLaunchData: UnableLaunchData,
|
||||
unableAutopilotReasons: ArrayList<UnableLaunchReason>?
|
||||
) {
|
||||
if (isConnected) {
|
||||
var isEquals = true
|
||||
@@ -73,6 +92,7 @@ object CallerAutopilotActionsListenerManager : CallerBase<IMoGoAutopilotActionsL
|
||||
!(unableAutopilotReasons != null || this.unableAutopilotReasons != null)
|
||||
if (this.isAutopilotAbility != isAutopilotAbility || !isEquals) {
|
||||
this.isAutopilotAbility = isAutopilotAbility
|
||||
this.unableLaunchData = unableLaunchData
|
||||
this.unableAutopilotReasons = unableAutopilotReasons
|
||||
notification()
|
||||
}
|
||||
@@ -82,7 +102,11 @@ object CallerAutopilotActionsListenerManager : CallerBase<IMoGoAutopilotActionsL
|
||||
private fun notification() {
|
||||
M_LISTENERS.forEach {
|
||||
val listener = it.value
|
||||
listener.onAutopilotAbility(isAutopilotAbility, unableAutopilotReasons)
|
||||
listener.onAutopilotAbility(
|
||||
isAutopilotAbility,
|
||||
unableLaunchData,
|
||||
unableAutopilotReasons
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user