Merge branch 'dev_robotaxi-d-app-module_2132_221223_2.13.2_sop' into dev_robotaxi-d-app-module_240_230131_2.14.0

This commit is contained in:
lixiaopeng
2023-02-15 16:55:23 +08:00
18 changed files with 222 additions and 162 deletions

View File

@@ -242,6 +242,7 @@ object CallerVisualAngleManager {
PriorityQueue<Record>()
}
@Volatile
private var mLevel:Boolean = false
fun updateLongSightLevel(level:Boolean){

View File

@@ -0,0 +1,61 @@
package com.mogo.eagle.core.function.call.obu
import com.mogo.eagle.core.function.api.obu.IMoGoObuTrafficLightDisapperListener
import com.mogo.eagle.core.function.api.obu.IMoGoObuTrafficLightListener
import java.util.concurrent.ConcurrentHashMap
object CallerObuTrafficLightDisappearManager {
private val M_OBU_TRAFFIC_LIGHT_LISTENER: ConcurrentHashMap<String, IMoGoObuTrafficLightDisapperListener> =
ConcurrentHashMap()
/**
* 添加监听
* @param tag 标记,用来注销监听使用
* @param listener 监听回调
*/
fun registerObuTrafficLightListener(
tag: String,
listener: IMoGoObuTrafficLightDisapperListener
) {
if (M_OBU_TRAFFIC_LIGHT_LISTENER.containsKey(tag)) {
return
}
M_OBU_TRAFFIC_LIGHT_LISTENER[tag] = listener
}
/**
* 删除监听
* @param tag 标记,用来注销监听使用
*/
fun unRegisterObuTrafficLightListener(tag: String) {
if (!M_OBU_TRAFFIC_LIGHT_LISTENER.containsKey(tag)) {
return
}
M_OBU_TRAFFIC_LIGHT_LISTENER.remove(tag)
}
/**
* 删除监听
* @param listener 要删除的监听对象
*/
// fun unRegisterObuTrafficLightListener(listener: IMoGoObuTrafficLightListener) {
// if (!M_OBU_TRAFFIC_LIGHT_LISTENER.containsValue(listener)) {
// return
// }
// M_OBU_TRAFFIC_LIGHT_LISTENER.forEach {
// if (it.value == listener) {
// M_OBU_TRAFFIC_LIGHT_LISTENER.remove(it.key)
// }
// }
// }
fun invokeObuTrafficLightDisappear() {
M_OBU_TRAFFIC_LIGHT_LISTENER.forEach {
val tag = it.key
val listener = it.value
listener.onObuLightDisapper()
}
}
}