Merge remote-tracking branch 'origin/dev_robotaxi-d-app-module_270_220510_2.7.0' into dev_robotaxi-d-app-module_270_220510_2.7.0
This commit is contained in:
@@ -545,7 +545,7 @@ class DebugSettingView @JvmOverloads constructor(
|
||||
}
|
||||
|
||||
|
||||
// 演示模式,上一次勾选的数据
|
||||
// 强制绘制引导线
|
||||
tbIsDrawAutopilotTrajectoryData.setOnCheckedChangeListener { _, isChecked ->
|
||||
FunctionBuildConfig.isIgnoreConditionsDrawAutopilotTrajectoryData = isChecked
|
||||
}
|
||||
@@ -598,6 +598,11 @@ class DebugSettingView @JvmOverloads constructor(
|
||||
// FunctionBuildConfig.isDrawObuIdentifyData = isChecked
|
||||
// }
|
||||
|
||||
//TODO
|
||||
tbIsDrawPath.setOnCheckedChangeListener { _, isChecked ->
|
||||
|
||||
}
|
||||
|
||||
// 模拟自动驾驶中
|
||||
tbChangeAutoPilotStatus.setOnCheckedChangeListener { _, isChecked ->
|
||||
CallerAutoPilotManager.setControlAutopilotCarAuto(isChecked)
|
||||
|
||||
@@ -1450,10 +1450,11 @@
|
||||
android:textOn="强制绘制引导线"
|
||||
android:textSize="@dimen/dp_24"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toLeftOf="@id/tbIsDrawAutopilotTrajectoryData"
|
||||
app:layout_constraintRight_toLeftOf="@id/tbIsDrawPath"
|
||||
app:layout_constraintTop_toBottomOf="@id/tbIsDrawIdentifyData" />
|
||||
|
||||
<ToggleButton
|
||||
android:id="@+id/tbIsDrawPath"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="2dp"
|
||||
|
||||
@@ -105,6 +105,8 @@ class MogoTrafficLightManager : IMogoCarLocationChangedListener2 {
|
||||
TrafficLightHMIManager.INSTANCE.hideTrafficLight()
|
||||
CallTrafficLightListenerManager.resetTrafficLightData()
|
||||
}
|
||||
CallTrafficLightListenerManager.invokeTrafficRequestError()
|
||||
|
||||
})
|
||||
}
|
||||
}, {
|
||||
|
||||
@@ -37,6 +37,8 @@ class TrafficLightDispatcher : IMoGoAutopilotIdentifyListener , IMoGoTrafficLigh
|
||||
CallTrafficLightListenerManager.registerTrafficLightListener(TAG, this)
|
||||
//注册监听AI云进入路口
|
||||
CallTrafficLightListenerManager.registerEnterCrossRoadListener(TAG, this)
|
||||
//注册监听红绿灯请求失败
|
||||
CallTrafficLightListenerManager.registerTrafficRequestErrorListener(TAG,this)
|
||||
//注册监听工控机感知红绿灯
|
||||
CallerAutopilotIdentifyListenerManager.addListener(TAG, this)
|
||||
}
|
||||
@@ -107,11 +109,21 @@ class TrafficLightDispatcher : IMoGoAutopilotIdentifyListener , IMoGoTrafficLigh
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 红绿灯接口请求失败
|
||||
*/
|
||||
override fun onTrafficRequestError() {
|
||||
hasAiLightStatus = false
|
||||
}
|
||||
|
||||
|
||||
fun destroy(){
|
||||
//取消注册监听AI云获取红绿灯状态
|
||||
CallTrafficLightListenerManager.unRegisterTrafficLightListener(TAG)
|
||||
//取消注册监听工控机感知红绿灯
|
||||
CallerAutopilotIdentifyListenerManager.removeListener(TAG)
|
||||
//取消注册监听红绿灯请求失败
|
||||
CallTrafficLightListenerManager.unRegisterTrafficRequestErrorListener(TAG)
|
||||
//取消注册监听AI云进入路口
|
||||
CallTrafficLightListenerManager.unRegisterEnterCrossRoadListener(TAG)
|
||||
}
|
||||
|
||||
@@ -12,9 +12,9 @@ class AdUpgradeStateHelper {
|
||||
private const val DOWNLOAD_FINISH = "31" //下载成功
|
||||
private const val DOWNLOAD_FAILED = "32" //下载失败
|
||||
|
||||
private const val UPGRADING = "50" //升级中
|
||||
private const val UPGRADE_SUCCEED = "51" //升级成功
|
||||
private const val UPGRADE_FAILED = "52" //升级失败
|
||||
private const val UPGRADING = "60" //升级中
|
||||
private const val UPGRADE_SUCCEED = "61" //升级成功
|
||||
private const val UPGRADE_FAILED = "62" //升级失败
|
||||
|
||||
private var UPGRADEABLE = false //是否是可升级状态
|
||||
|
||||
|
||||
@@ -16,4 +16,11 @@ interface IMoGoTrafficLightListener {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 红绿灯接口请求失败
|
||||
*/
|
||||
fun onTrafficRequestError(){
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -82,6 +82,32 @@ object CallTrafficLightListenerManager {
|
||||
M_TRAFFIC_LIGHT_LISTENER.remove(tag)
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加监听
|
||||
* @param tag 标记,用来注销监听使用
|
||||
* @param listener 监听回调
|
||||
*/
|
||||
fun registerTrafficRequestErrorListener(
|
||||
@Nullable tag: String,
|
||||
@Nullable listener: IMoGoTrafficLightListener
|
||||
) {
|
||||
if (M_TRAFFIC_LIGHT_LISTENER.containsKey(tag)) {
|
||||
return
|
||||
}
|
||||
M_TRAFFIC_LIGHT_LISTENER[tag] = listener
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除监听
|
||||
* @param tag 标记,用来注销监听使用
|
||||
*/
|
||||
fun unRegisterTrafficRequestErrorListener(@Nullable tag: String) {
|
||||
if (!M_TRAFFIC_LIGHT_LISTENER.containsKey(tag)) {
|
||||
return
|
||||
}
|
||||
M_TRAFFIC_LIGHT_LISTENER.remove(tag)
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除监听
|
||||
* @param listener 要删除的监听对象
|
||||
@@ -113,6 +139,13 @@ object CallTrafficLightListenerManager {
|
||||
}
|
||||
}
|
||||
|
||||
fun invokeTrafficRequestError(){
|
||||
M_TRAFFIC_LIGHT_LISTENER.forEach{
|
||||
val listener = it.value
|
||||
listener.onTrafficRequestError()
|
||||
}
|
||||
}
|
||||
|
||||
fun resetTrafficLightData() {
|
||||
trafficLightResult = null
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user