Merge remote-tracking branch 'origin/dev_arch_opt_3.0' into dev_arch_opt_3.0
This commit is contained in:
@@ -10,7 +10,6 @@ import com.mogo.eagle.core.data.map.Infrastructure
|
||||
import com.mogo.eagle.core.data.notice.NoticeNormalData
|
||||
import com.mogo.eagle.core.data.notice.NoticeTrafficStylePushData
|
||||
import com.mogo.eagle.core.data.report.ReportEntity
|
||||
import com.mogo.eagle.core.function.api.hmi.view.IViewTrafficLight
|
||||
import com.mogo.eagle.core.function.api.hmi.warning.IMoGoHmiProvider
|
||||
import com.mogo.eagle.core.function.api.hmi.warning.IMoGoWarningStatusListener
|
||||
|
||||
@@ -32,20 +31,6 @@ object CallerHmiManager {
|
||||
waringProviderApi?.displayEffects()
|
||||
}
|
||||
|
||||
/**
|
||||
* 控制转向灯功能
|
||||
*/
|
||||
fun setTurnLightFunction(isOpen: Boolean) {
|
||||
waringProviderApi?.setTurnLightFunction(isOpen)
|
||||
}
|
||||
|
||||
/**
|
||||
* 控制刹车功能
|
||||
*/
|
||||
fun setBrakeLightFunction(isOpen: Boolean) {
|
||||
waringProviderApi?.setBrakeLightFunction(isOpen)
|
||||
}
|
||||
|
||||
/**
|
||||
* 控制显示sn绑定弹框
|
||||
*/
|
||||
@@ -98,67 +83,6 @@ object CallerHmiManager {
|
||||
waringProviderApi?.disableWarningV2X(tag)
|
||||
}
|
||||
|
||||
/**
|
||||
* 展示红绿灯预警
|
||||
*
|
||||
* @param checkLightId 0-都是默认,1-红,2-黄,3-绿
|
||||
* @param lightSource 1:云端下发;2:自车感知;3:OBU
|
||||
*/
|
||||
fun showWarningTrafficLight(checkLightId: Int, lightSource: Int) {
|
||||
waringProviderApi?.showWarningTrafficLight(checkLightId, lightSource)
|
||||
}
|
||||
|
||||
/**
|
||||
* 关闭红绿灯预警
|
||||
*/
|
||||
fun disableWarningTrafficLight() {
|
||||
waringProviderApi?.disableWarningTrafficLight()
|
||||
}
|
||||
|
||||
/**
|
||||
* 红绿灯是否展示
|
||||
*/
|
||||
fun isWarningTrafficLightShow(): Boolean {
|
||||
return waringProviderApi?.isWarningTrafficLightShow() ?: false
|
||||
}
|
||||
|
||||
/**
|
||||
* 关闭红绿灯倒计时
|
||||
*/
|
||||
fun disableWarningTrafficLightCountDown() {
|
||||
waringProviderApi?.disableWarningTrafficLightCountDown()
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改红灯倒计时
|
||||
*/
|
||||
fun changeCountdownRed(redNum: Int) {
|
||||
waringProviderApi?.changeCountdownRed(redNum)
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改黄灯倒计时
|
||||
*/
|
||||
fun changeCountdownYellow(yellowNum: Int) {
|
||||
waringProviderApi?.changeCountdownYellow(yellowNum)
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改绿灯倒计时
|
||||
*/
|
||||
fun changeCountdownGreen(greenNum: Int) {
|
||||
waringProviderApi?.changeCountdownGreen(greenNum)
|
||||
}
|
||||
|
||||
/**
|
||||
* @param readNum 红灯倒计时
|
||||
* @param yellowNum 黄灯倒计时
|
||||
* @param greenNum 绿灯倒计时
|
||||
*/
|
||||
fun changeCountdownTrafficLightNum(readNum: Int, yellowNum: Int, greenNum: Int) {
|
||||
waringProviderApi?.changeCountdownTrafficLightNum(readNum, yellowNum, greenNum)
|
||||
}
|
||||
|
||||
/**
|
||||
* 展示指定方位上的红框预警
|
||||
* @param direction
|
||||
@@ -279,14 +203,6 @@ object CallerHmiManager {
|
||||
waringProviderApi?.hideSmallFragment()
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置 红绿灯 代理View
|
||||
* @param view
|
||||
*/
|
||||
fun setProxyTrafficLightView(view: IViewTrafficLight) {
|
||||
waringProviderApi?.setProxyTrafficLightView(view)
|
||||
}
|
||||
|
||||
/**
|
||||
* 展示工控机监控上报数据
|
||||
* @param errorReportList 错误级别上报数据列表
|
||||
|
||||
@@ -1,26 +0,0 @@
|
||||
package com.mogo.eagle.core.function.call.obu
|
||||
|
||||
import com.mogo.eagle.core.function.api.obu.IMoGoObuTrafficLightListener
|
||||
import com.mogo.eagle.core.function.call.base.CallerBase
|
||||
|
||||
/**
|
||||
* OBU 红绿灯数据监听管理
|
||||
*/
|
||||
object CallerObuTrafficLightListenerManager : CallerBase<IMoGoObuTrafficLightListener>() {
|
||||
|
||||
var mLight: Int = 0
|
||||
|
||||
override fun doSomeAfterAddListener(tag: String, listener: IMoGoObuTrafficLightListener) {
|
||||
listener.onObuTrafficLight(mLight)
|
||||
}
|
||||
|
||||
fun invokeObuTrafficLight(light: Int) {
|
||||
this.mLight = light
|
||||
M_LISTENERS.forEach {
|
||||
val tag = it.key
|
||||
val listener = it.value
|
||||
listener.onObuTrafficLight(light)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,10 +1,12 @@
|
||||
package com.mogo.eagle.core.function.call.trafficlight
|
||||
|
||||
import com.mogo.eagle.core.data.enums.DataSourceType
|
||||
import com.mogo.eagle.core.data.enums.TrafficLightEnum
|
||||
import com.mogo.eagle.core.data.trafficlight.TrafficLightResult
|
||||
import com.mogo.eagle.core.function.api.trafficlight.IMoGoTrafficLightListener
|
||||
import com.mogo.eagle.core.function.call.base.CallerBase
|
||||
|
||||
object CallerTrafficLightListenerManager : CallerBase<IMoGoTrafficLightListener>() {
|
||||
object CallerTrafficLightListenerManager : CallerBase<IMoGoTrafficLightListener>() {
|
||||
|
||||
private var trafficLightResult: TrafficLightResult? = null
|
||||
|
||||
@@ -17,7 +19,6 @@ object CallerTrafficLightListenerManager : CallerBase<IMoGoTrafficLightListener
|
||||
fun invokeTrafficLightStatus(trafficLightResult: TrafficLightResult) {
|
||||
this.trafficLightResult = trafficLightResult
|
||||
M_LISTENERS.forEach {
|
||||
val tag = it.key
|
||||
val listener = it.value
|
||||
listener.onTrafficLightStatus(trafficLightResult)
|
||||
}
|
||||
@@ -30,15 +31,78 @@ object CallerTrafficLightListenerManager : CallerBase<IMoGoTrafficLightListener
|
||||
}
|
||||
}
|
||||
|
||||
fun invokeTrafficRequestError(){
|
||||
M_LISTENERS.forEach{
|
||||
fun invokeTrafficRequestError() {
|
||||
M_LISTENERS.forEach {
|
||||
val listener = it.value
|
||||
listener.onTrafficRequestError()
|
||||
}
|
||||
}
|
||||
|
||||
fun resetTrafficLightData() {
|
||||
fun invokeObuTrafficLightStatus(light: TrafficLightEnum) {
|
||||
M_LISTENERS.forEach {
|
||||
val listener = it.value
|
||||
listener.onObuTrafficLightStatus(light)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 重置红绿灯状态并隐藏
|
||||
*/
|
||||
fun resetTrafficLightStatus(hideTrafficLight:Boolean = true) {
|
||||
trafficLightResult = null
|
||||
// 隐藏traffic light
|
||||
if(hideTrafficLight){
|
||||
disableTrafficLight()
|
||||
}
|
||||
}
|
||||
|
||||
fun showTrafficLight(checkLightId: TrafficLightEnum, lightSource: DataSourceType) {
|
||||
M_LISTENERS.forEach {
|
||||
val listener = it.value
|
||||
listener.showTrafficLight(checkLightId, lightSource)
|
||||
}
|
||||
}
|
||||
|
||||
fun changeCountdownTrafficLightNum(readNum: Int, yellowNum: Int, greenNum: Int) {
|
||||
M_LISTENERS.forEach {
|
||||
val listener = it.value
|
||||
listener.changeCountdownTrafficLightNum(readNum, yellowNum, greenNum)
|
||||
}
|
||||
}
|
||||
|
||||
fun changeCountdownGreen(greenNum: Int) {
|
||||
M_LISTENERS.forEach {
|
||||
val listener = it.value
|
||||
listener.changeCountdownGreen(greenNum)
|
||||
}
|
||||
}
|
||||
|
||||
fun changeCountdownYellow(yellowNum: Int) {
|
||||
M_LISTENERS.forEach {
|
||||
val listener = it.value
|
||||
listener.changeCountdownYellow(yellowNum)
|
||||
}
|
||||
}
|
||||
|
||||
fun changeCountdownRed(redNum: Int) {
|
||||
M_LISTENERS.forEach {
|
||||
val listener = it.value
|
||||
listener.changeCountdownRed(redNum)
|
||||
}
|
||||
}
|
||||
|
||||
fun disableTrafficLight() {
|
||||
M_LISTENERS.forEach {
|
||||
val listener = it.value
|
||||
listener.disableTrafficLight()
|
||||
}
|
||||
}
|
||||
|
||||
fun disableTrafficLightCountDown() {
|
||||
M_LISTENERS.forEach {
|
||||
val listener = it.value
|
||||
listener.disableTrafficLightCountDown()
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user