[2.13.2] 修改预警提示,添加红绿灯的来源显示
This commit is contained in:
@@ -200,6 +200,9 @@ class SingleTrafficLightView @JvmOverloads constructor(
|
||||
2 -> {
|
||||
mLightSourceTV!!.text = "自车感知"
|
||||
}
|
||||
3 -> {
|
||||
mLightSourceTV!!.text = "OBU"
|
||||
}
|
||||
else -> {
|
||||
mLightSourceTV!!.visibility = GONE
|
||||
}
|
||||
@@ -208,9 +211,9 @@ class SingleTrafficLightView @JvmOverloads constructor(
|
||||
}
|
||||
|
||||
private fun resetView(){
|
||||
// 小巴车的司机端需要展示红绿灯信号来源
|
||||
if(AppIdentityModeUtils.isDriver(FunctionBuildConfig.appIdentityMode)
|
||||
&& AppIdentityModeUtils.isBus(FunctionBuildConfig.appIdentityMode)){
|
||||
// 小巴车的司机端需要展示红绿灯信号来源 ,由于需要知道来源,这里不在限制
|
||||
// if(AppIdentityModeUtils.isDriver(FunctionBuildConfig.appIdentityMode)
|
||||
// && AppIdentityModeUtils.isBus(FunctionBuildConfig.appIdentityMode)){
|
||||
val lp = this.layoutParams as MarginLayoutParams
|
||||
lp.width = context.resources.getDimension(R.dimen.hmi_traffic_light_bus_layout_width).toInt()
|
||||
this.layoutParams = lp
|
||||
@@ -219,15 +222,15 @@ class SingleTrafficLightView @JvmOverloads constructor(
|
||||
mLightSourceTV!!.visibility = View.VISIBLE
|
||||
mLightSourceTV!!.setPadding(0,0,0,0)
|
||||
mLightIconBG!!.layoutParams.width = context.resources.getDimension(R.dimen.hmi_traffic_light_bus_bg_width).toInt()
|
||||
}else{
|
||||
val lp = this.layoutParams as MarginLayoutParams
|
||||
lp.width = context.resources.getDimension(R.dimen.hmi_traffic_light_layout_width).toInt()
|
||||
this.layoutParams = lp
|
||||
mLightTimeTV!!.visibility = View.VISIBLE
|
||||
mLightSourceDivider!!.visibility = View.GONE
|
||||
mLightSourceTV!!.visibility = View.GONE
|
||||
mLightIconBG!!.layoutParams.width = context.resources.getDimension(R.dimen.hmi_traffic_light_bg_width).toInt()
|
||||
}
|
||||
// }else{
|
||||
// val lp = this.layoutParams as MarginLayoutParams
|
||||
// lp.width = context.resources.getDimension(R.dimen.hmi_traffic_light_layout_width).toInt()
|
||||
// this.layoutParams = lp
|
||||
// mLightTimeTV!!.visibility = View.VISIBLE
|
||||
// mLightSourceDivider!!.visibility = View.GONE
|
||||
// mLightSourceTV!!.visibility = View.GONE
|
||||
// mLightIconBG!!.layoutParams.width = context.resources.getDimension(R.dimen.hmi_traffic_light_bg_width).toInt()
|
||||
// }
|
||||
}
|
||||
|
||||
}
|
||||
@@ -750,7 +750,7 @@ class MogoPrivateObuManager private constructor() {
|
||||
when (currentLight.phase) {
|
||||
// 灯光不可用
|
||||
0x0 -> {
|
||||
CallerHmiManager.showWarningTrafficLight(0, 2)
|
||||
CallerHmiManager.showWarningTrafficLight(0, 3)
|
||||
}
|
||||
// 红灯
|
||||
0x1 -> {
|
||||
@@ -759,7 +759,7 @@ class MogoPrivateObuManager private constructor() {
|
||||
isRedLight = true
|
||||
}
|
||||
isGreenLight = false
|
||||
CallerHmiManager.showWarningTrafficLight(1, 2)
|
||||
CallerHmiManager.showWarningTrafficLight(1, 3)
|
||||
|
||||
val red = currentLight.count_down.toInt()
|
||||
CallerHmiManager.changeCountdownRed(red)
|
||||
@@ -774,7 +774,7 @@ class MogoPrivateObuManager private constructor() {
|
||||
isGreenLight = true
|
||||
}
|
||||
isRedLight = false
|
||||
CallerHmiManager.showWarningTrafficLight(3, 2)
|
||||
CallerHmiManager.showWarningTrafficLight(3, 3)
|
||||
val green = currentLight.count_down.toInt()
|
||||
CallerHmiManager.changeCountdownGreen(green)
|
||||
//防止数据出现问题的容错
|
||||
|
||||
@@ -399,6 +399,7 @@ class MogoPrivateObuNewManager private constructor() {
|
||||
|
||||
//限速预警, ADD处理一次
|
||||
MogoObuConstants.RSI_SCENE_TYPE.SLW.toString() -> {
|
||||
appId = EventTypeEnumNew.TYPE_USECASE_ID_ROAD_SPEED_LIMIT.poiType
|
||||
alertContent = EventTypeEnumNew.getWarningContent(appId)
|
||||
ttsContent = EventTypeEnumNew.getWarningTts(appId)
|
||||
}
|
||||
@@ -958,7 +959,7 @@ class MogoPrivateObuNewManager private constructor() {
|
||||
when (currentLight.light) {
|
||||
// 灯光不可用
|
||||
0 -> {
|
||||
CallerHmiManager.showWarningTrafficLight(0, 2)
|
||||
CallerHmiManager.showWarningTrafficLight(0, 3)
|
||||
}
|
||||
// 红灯
|
||||
2, 3 -> {
|
||||
@@ -967,7 +968,7 @@ class MogoPrivateObuNewManager private constructor() {
|
||||
isRedLight = true
|
||||
}
|
||||
isGreenLight = false
|
||||
CallerHmiManager.showWarningTrafficLight(1, 2)
|
||||
CallerHmiManager.showWarningTrafficLight(1, 3)
|
||||
|
||||
val red = currentLight.countDown.toInt()
|
||||
CallerHmiManager.changeCountdownRed(red)
|
||||
@@ -980,7 +981,7 @@ class MogoPrivateObuNewManager private constructor() {
|
||||
isGreenLight = true
|
||||
}
|
||||
isRedLight = false
|
||||
CallerHmiManager.showWarningTrafficLight(3, 2)
|
||||
CallerHmiManager.showWarningTrafficLight(3, 3)
|
||||
val green = currentLight.countDown.toInt()
|
||||
CallerHmiManager.changeCountdownGreen(green)
|
||||
}
|
||||
@@ -988,7 +989,7 @@ class MogoPrivateObuNewManager private constructor() {
|
||||
// 黄灯
|
||||
7, 8 -> {
|
||||
CallerHmiManager.disableWarningV2X(appId.toString())
|
||||
CallerHmiManager.showWarningTrafficLight(2, 2)
|
||||
CallerHmiManager.showWarningTrafficLight(2, 3)
|
||||
val yellow = currentLight.countDown.toInt()
|
||||
CallerHmiManager.changeCountdownYellow(yellow)
|
||||
}
|
||||
|
||||
@@ -109,8 +109,6 @@ class TrafficLightDispatcher : IMoGoAutopilotIdentifyListener , IMoGoTrafficLigh
|
||||
hasAiLightStatus = false
|
||||
}, 5000)
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user