[2.15.0] 添加绿波和闯红灯的开关控制

This commit is contained in:
lixiaopeng
2023-03-31 12:18:43 +08:00
parent 40983e1a22
commit fa19fd0653
5 changed files with 240 additions and 119 deletions

View File

@@ -10,6 +10,7 @@ import com.mogo.eagle.core.function.api.datacenter.obu.IMoGoObuWarningMapListene
import com.mogo.eagle.core.function.api.datacenter.obu.IMoGoObuWarningRsiListener
import com.mogo.eagle.core.function.api.datacenter.obu.IMoGoObuWarningRsmListener
import com.mogo.eagle.core.function.api.datacenter.obu.IMoGoObuWarningSpatListener
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ02ListenerManager
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager
import com.mogo.eagle.core.function.call.map.CallerMapUIServiceManager
import com.mogo.eagle.core.function.call.obu.*
@@ -38,7 +39,7 @@ class MogoObuDcCombineManager private constructor() : IMoGoObuWarningRsiListener
private var mContext: Context? = null
private val TAG = "MogoObuDcCombineManager"
private var mLimitSpeed: Int = 0
fun init(context: Context) {
mContext = context
@@ -238,14 +239,23 @@ class MogoObuDcCombineManager private constructor() : IMoGoObuWarningRsiListener
//限速预警, ADD处理一次
MogoObuConstants.RSI_SCENE_TYPE.SLW.toString() -> {
appId = EventTypeEnumNew.TYPE_USECASE_ID_ROAD_SPEED_LIMIT.poiType
alertContent = EventTypeEnumNew.getWarningContent(appId)
ttsContent = EventTypeEnumNew.getWarningTts(appId)
if (mLimitSpeed > 0) {
alertContent = String.format(
EventTypeEnumNew.getWarningContent(appId),
mLimitSpeed
)
ttsContent = String.format(
EventTypeEnumNew.getWarningTts(appId),
mLimitSpeed
)
}
}
}
CallerLogger.d(
"${M_OBU}${TAG}",
"MogoObuDcCombineManager ttsContent = $ttsContent --alertContent = $alertContent --appId = $appId ---direction = ${direction.direction} --distance = ${rsiWarningData.warningMsgList[0].distance} ---eventRadius = ${rsiWarningData.warningMsgList[0].eventRadius} --speedMaxLimit = ${rsiWarningData.warningMsgList[0].speedMaxLimit}")
"MogoObuDcCombineManager ttsContent = $ttsContent --alertContent = $alertContent --appId = $appId ---direction = ${direction.direction} --distance = ${rsiWarningData.warningMsgList[0].distance} ---eventRadius = ${rsiWarningData.warningMsgList[0].eventRadius} --speedMaxLimit = ${rsiWarningData.warningMsgList[0].speedMaxLimit}"
)
when (status) {
// 添加
MogoObuConstants.STATUS.ADD -> {
@@ -342,7 +352,9 @@ class MogoObuDcCombineManager private constructor() : IMoGoObuWarningRsiListener
when (rsmWarningData.warningMsg.warningDataList[0].status) {
MogoObuConstants.STATUS.ADD -> { // 添加
//更新模型的颜色
TrafficDataConvertUtilsNew.cvxPtcThreatIndInfo2TrafficData(rsmWarningData)
TrafficDataConvertUtilsNew.cvxPtcThreatIndInfo2TrafficData(
rsmWarningData
)
?.let {
CallerMapUIServiceManager.getMarkerService()
?.updateITrafficThreatLevelInfo(it)
@@ -401,6 +413,7 @@ class MogoObuDcCombineManager private constructor() : IMoGoObuWarningRsiListener
)
when (data.status) {
MogoObuConstants.STATUS.ADD -> { // 添加
mLimitSpeed = (data.speedMaxLimit * 3.6).roundToInt()
CallerLimitingVelocityListenerManager.invokeUnion(
(data.speedMaxLimit * 3.6).roundToInt(),
DataSourceType.OBU
@@ -490,6 +503,8 @@ class MogoObuDcCombineManager private constructor() : IMoGoObuWarningRsiListener
) {
var ttsContent = ""
var alertContent = ""
var ttsContentNew = ""
var alertContentNew = ""
//这里需要根据真实数据确定 index 取值方式
val currentLight = lights[0]
CallerLogger.e(
@@ -503,61 +518,74 @@ class MogoObuDcCombineManager private constructor() : IMoGoObuWarningRsiListener
}
1 -> { //闯红灯 V2I_RLVW_VIOLATION_TYPE_RUNNING_RED_LIGHT 一个红灯周期只显示一次
if (!isShowRunRedLight) {
isShowRunRedLight = true
ttsContent =
EventTypeEnumNew.getWarningTts(EventTypeEnumNew.TYPE_USECASE_ID_IVP_RED.poiType)
alertContent =
EventTypeEnumNew.getWarningContent(EventTypeEnumNew.TYPE_USECASE_ID_IVP_RED.poiType)
CallerLogger.d(
"${M_OBU}${TAG}",
"MogoObuDcCombineManager changeTrafficLightStatus 闯红灯 --------> ttsContent = $ttsContent ---alertContent = $alertContent "
)
if (alertContent.isEmpty() || ttsContent.isEmpty()) {
return
if (HmiBuildConfig.isShowRunRedLightView) {
if (!isShowRunRedLight) {
isShowRunRedLight = true
ttsContent =
EventTypeEnumNew.getWarningTts(EventTypeEnumNew.TYPE_USECASE_ID_IVP_RED.poiType)
alertContent =
EventTypeEnumNew.getWarningContent(EventTypeEnumNew.TYPE_USECASE_ID_IVP_RED.poiType)
CallerLogger.d(
"${M_OBU}${TAG}",
"MogoObuDcCombineManager changeTrafficLightStatus 闯红灯 --------> ttsContent = $ttsContent ---alertContent = $alertContent "
)
if (alertContent.isEmpty() || ttsContent.isEmpty()) {
return
}
saveObuToDcData(
EventTypeEnumNew.TYPE_USECASE_ID_IVP_RED.poiType,
alertContent,
ttsContent
)
showWarning(
EventTypeEnumNew.TYPE_USECASE_ID_IVP_RED.poiType,
alertContent,
ttsContent,
WarningDirectionEnum.ALERT_WARNING_NON
)
}
saveObuToDcData(EventTypeEnumNew.TYPE_USECASE_ID_IVP_RED.poiType, alertContent, ttsContent)
showWarning(EventTypeEnumNew.TYPE_USECASE_ID_IVP_RED.poiType, alertContent, ttsContent, WarningDirectionEnum.ALERT_WARNING_NON)
}
}
2 -> { //绿波通行引导 V2I_RLVW_VIOLATION_TYPE_NO_VIOLATION 一个绿灯周期只显示一次
if (!isShowGreenWave) {
isShowGreenWave = true
CallerLogger.d(
"${M_OBU}${TAG}",
"MogoObuDcCombineManager 绿波通行引导 --------> speed_min = ${currentLight.suggestMinSpeed} --speed_max = ${currentLight.suggestMaxSpeed}"
)
val adviceSpeed =
"${Math.round(currentLight.suggestMinSpeed * 3.6)} - ${
Math.round(
currentLight.suggestMaxSpeed * 3.6
)
}"
val adviceSpeedTts =
"${Math.round(currentLight.suggestMinSpeed * 3.6)} - ${
Math.round(
currentLight.suggestMaxSpeed * 3.6
)
}"
ttsContent =
String.format(
EventTypeEnumNew.getWarningTts(EventTypeEnumNew.TYPE_USECASE_ID_IVP_GREEN.poiType),
adviceSpeedTts
if (HmiBuildConfig.isShowGreenWaveView) {
if (!isShowGreenWave) {
isShowGreenWave = true
CallerLogger.d(
"${M_OBU}${TAG}",
"MogoObuDcCombineManager 绿波通行引导 --------> speed_min = ${currentLight.suggestMinSpeed} --speed_max = ${currentLight.suggestMaxSpeed}"
)
alertContent =
String.format(
EventTypeEnumNew.getWarningContent(EventTypeEnumNew.TYPE_USECASE_ID_IVP_GREEN.poiType),
adviceSpeed
)
val maxSpeed = currentLight.suggestMaxSpeed * 3.6
if (maxSpeed > 0) {
if (alertContent.isEmpty() || ttsContent.isEmpty()) {
return
var minSpeedTemp = Math.round(currentLight.suggestMinSpeed * 3.6)
var maxSpeedTemp = Math.round(currentLight.suggestMaxSpeed * 3.6)
if (minSpeedTemp == maxSpeedTemp) {
minSpeedTemp -= 5
}
val maxSpeed = currentLight.suggestMaxSpeed
if (maxSpeed > 0) {
var currentSpeed =
CallerChassisLocationGCJ02ListenerManager.getChassisLocationGCJ02().gnssSpeed.toDouble()
if (currentSpeed > 0) {
ttsContentNew =
if ((currentSpeed * 3.6).roundToInt() in (minSpeedTemp + 1) until maxSpeedTemp) {
"蘑菇路侧提醒您,推荐保持当前车速通过路口"
} else {
"蘑菇路侧提醒您,推荐保持车速$minSpeedTemp - $maxSpeedTemp KM/H通过路口"
}
alertContentNew = "推荐车速$minSpeedTemp - $maxSpeedTemp KM/H"
}
saveObuToDcData(
EventTypeEnumNew.TYPE_USECASE_ID_IVP_GREEN.poiType,
alertContentNew,
ttsContentNew
)
showWarning(
EventTypeEnumNew.TYPE_USECASE_ID_IVP_GREEN.poiType,
alertContentNew,
ttsContentNew,
WarningDirectionEnum.ALERT_WARNING_NON
)
}
saveObuToDcData(EventTypeEnumNew.TYPE_USECASE_ID_IVP_GREEN.poiType, alertContent, ttsContent)
showWarning(EventTypeEnumNew.TYPE_USECASE_ID_IVP_GREEN.poiType, alertContent, ttsContent, WarningDirectionEnum.ALERT_WARNING_NON)
}
}
}
@@ -606,13 +634,23 @@ class MogoObuDcCombineManager private constructor() : IMoGoObuWarningRsiListener
* 保存obu通过工控机传输的数据到消息盒子
*/
private fun saveObuToDcData(type: String, content: String, tts: String) {
CallerObuSaveMessageListenerManager.invokeObuSaveMessage(type, content, tts, DataSourceType.TELEMATIC)
CallerObuSaveMessageListenerManager.invokeObuSaveMessage(
type,
content,
tts,
DataSourceType.TELEMATIC
)
}
/**
* 消息盒子对应消息的语音播报
*/
private fun showWarning(type: String, content: String, tts: String, direction: WarningDirectionEnum) {
private fun showWarning(
type: String,
content: String,
tts: String,
direction: WarningDirectionEnum
) {
CallerHmiManager.warningV2X(type, content, tts, null, direction, isFromObu = true)
}

View File

@@ -101,11 +101,12 @@ class MogoPrivateObuNewManager private constructor() : OnUpgradeListener {
override fun onUpgradeStatus(status: ObuSoftwareUpgradeStatus?, t: Throwable?) {
CallerLogger.d("$M_OBU${MogoObuConst.TAG_UPGRADE_OBU}", "onUpgradeStatus status = $status ")
//上传完成就相当于成功了,立即升级,比上电升级,只是多了一个重启
if (status == ObuSoftwareUpgradeStatus.UPLOAD_FINISH|| status == ObuSoftwareUpgradeStatus.EXEC_UPGRADE_PROGRAM_FINISH
|| status == ObuSoftwareUpgradeStatus.CONNECTION_FAILED|| status == ObuSoftwareUpgradeStatus.AUTHENTICATION_FAILED
|| status == ObuSoftwareUpgradeStatus.CHANNEL_ABNORMITY|| status == ObuSoftwareUpgradeStatus.UPGRADE_PACKAGE_ERROR
if (status == ObuSoftwareUpgradeStatus.UPLOAD_FINISH || status == ObuSoftwareUpgradeStatus.EXEC_UPGRADE_PROGRAM_FINISH
|| status == ObuSoftwareUpgradeStatus.CONNECTION_FAILED || status == ObuSoftwareUpgradeStatus.AUTHENTICATION_FAILED
|| status == ObuSoftwareUpgradeStatus.CHANNEL_ABNORMITY || status == ObuSoftwareUpgradeStatus.UPGRADE_PACKAGE_ERROR
|| status == ObuSoftwareUpgradeStatus.UPGRADE_PACKAGE_CHECK_FAILED || status == ObuSoftwareUpgradeStatus.PACKAGE_UPLOAD_FAILED
|| status == ObuSoftwareUpgradeStatus.EXEC_UPGRADE_PROGRAM_FAILED || status == ObuSoftwareUpgradeStatus.UNKNOWN) {
|| status == ObuSoftwareUpgradeStatus.EXEC_UPGRADE_PROGRAM_FAILED || status == ObuSoftwareUpgradeStatus.UNKNOWN
) {
deleteObuFile()
}
@@ -119,7 +120,10 @@ class MogoPrivateObuNewManager private constructor() : OnUpgradeListener {
* 当前的obu版本
*/
override fun onCurrentVersion(version: MogoObuSystemBConfigData) {
CallerLogger.d("$M_OBU${MogoObuConst.TAG_UPGRADE_OBU}", "onCurrentVersion version = ${version.version}")
CallerLogger.d(
"$M_OBU${MogoObuConst.TAG_UPGRADE_OBU}",
"onCurrentVersion version = ${version.version}"
)
if (!version.version.isNullOrEmpty()) {
CallerDevaToolsManager.queryObuUpgrade(version.version)
}
@@ -128,11 +132,14 @@ class MogoPrivateObuNewManager private constructor() : OnUpgradeListener {
/**
* 删除obu相关的文件夹
*/
fun deleteObuFile(){
fun deleteObuFile() {
UiThreadHandler.post {
var isDeleteSuccess = FileUtils.delete(Config.downLoadObuPath)
var isDeleteUnzipSuccess = FileUtils.delete(Config.downLoadUnzipObuPath)
CallerLogger.d("$M_OBU${MogoObuConst.TAG_UPGRADE_OBU}", "deleteObuFile isDeleteSuccess = $isDeleteSuccess ----isDeleteUnzipSuccess = $isDeleteUnzipSuccess")
CallerLogger.d(
"$M_OBU${MogoObuConst.TAG_UPGRADE_OBU}",
"deleteObuFile isDeleteSuccess = $isDeleteSuccess ----isDeleteUnzipSuccess = $isDeleteUnzipSuccess"
)
}
}
@@ -153,8 +160,12 @@ class MogoPrivateObuNewManager private constructor() : OnUpgradeListener {
* @return 是否调用成功
*/
fun uploadObuPack(filePathArray: Array<String>) {
CallerLogger.d("$M_OBU${MogoObuConst.TAG_UPGRADE_OBU}", " uploadObuPack filePathArray = $filePathArray")
ObuManager.getInstance().uploadUpgradePackage(MogoObuConst.OBU_DEFAULT_IP, filePathArray,true,this)
CallerLogger.d(
"$M_OBU${MogoObuConst.TAG_UPGRADE_OBU}",
" uploadObuPack filePathArray = $filePathArray"
)
ObuManager.getInstance()
.uploadUpgradePackage(MogoObuConst.OBU_DEFAULT_IP, filePathArray, true, this)
}
/**
@@ -232,7 +243,8 @@ class MogoPrivateObuNewManager private constructor() : OnUpgradeListener {
}
MogoObuConstants.CALL_FUNCTION.TOPIC_REGIST, MogoObuConstants.CALL_FUNCTION.TOPIC_CANCEL -> {
val str = if (result.function === MogoObuConstants.CALL_FUNCTION.TOPIC_REGIST) "注册" else "取消注册"
val str =
if (result.function === MogoObuConstants.CALL_FUNCTION.TOPIC_REGIST) "注册" else "取消注册"
val callRegisterResult = result as MogoObuCallRegisterResult
if (callRegisterResult.results != null && !callRegisterResult.results.isEmpty()) {
val size = callRegisterResult.results.size
@@ -290,10 +302,14 @@ class MogoPrivateObuNewManager private constructor() : OnUpgradeListener {
data.vehBasicsMsg?.let {
TrafficDataConvertUtilsNew.cvxRvInfoIndInfo2TrafficData(it)
?.let { data ->
CallerMapUIServiceManager.getMarkerService()?.updateITrafficLocationInfo(data)
CallerMapUIServiceManager.getMarkerService()
?.updateITrafficLocationInfo(data)
}
}.also {
CallerLogger.e("$M_OBU${MogoObuConst.TAG_MOGO_NEW_OBU}", "cvxRvInfoIndInfo2TrafficData 数据转换异常,请检查参数是否齐全")
CallerLogger.e(
"$M_OBU${MogoObuConst.TAG_MOGO_NEW_OBU}",
"cvxRvInfoIndInfo2TrafficData 数据转换异常,请检查参数是否齐全"
)
}
CallerLogger.d("$M_OBU${MogoObuConst.TAG_MOGO_NEW_OBU}", data.toString())
@@ -504,8 +520,14 @@ class MogoPrivateObuNewManager private constructor() : OnUpgradeListener {
// alertContent = EventTypeEnumNew.getWarningContent(appId)
// ttsContent = EventTypeEnumNew.getWarningTts(appId)
if (mLimitSpeed > 0) {
alertContent = String.format(EventTypeEnumNew.getWarningContent(appId), mLimitSpeed)
ttsContent = String.format(EventTypeEnumNew.getWarningTts(appId), mLimitSpeed)
alertContent = String.format(
EventTypeEnumNew.getWarningContent(appId),
mLimitSpeed
)
ttsContent = String.format(
EventTypeEnumNew.getWarningTts(appId),
mLimitSpeed
)
}
}
}
@@ -891,7 +913,9 @@ class MogoPrivateObuNewManager private constructor() : OnUpgradeListener {
if (level == 2 || level == 3) {
//不显示弹框,其它保留
saveObuData(v2xType, alertContent, ttsContent)
CallerHmiManager.warningV2X(v2xType, alertContent, ttsContent,// 只有第一次才tts防止更新的时候不断的提醒
CallerHmiManager.warningV2X(v2xType,
alertContent,
ttsContent,// 只有第一次才tts防止更新的时候不断的提醒
object : IMoGoWarningStatusListener {
override fun onShow() {
super.onShow()
@@ -905,7 +929,10 @@ class MogoPrivateObuNewManager private constructor() : OnUpgradeListener {
CallerVisualAngleManager.changeAngle(Default())
}
}
}, direction, isFromObu = true)
},
direction,
isFromObu = true
)
}
//更新周边车辆进行预警颜色变换,车辆实时移动和变色 UUID不需要匹配了
@@ -988,34 +1015,37 @@ class MogoPrivateObuNewManager private constructor() : OnUpgradeListener {
}
1 -> {//闯红灯 V2I_RLVW_VIOLATION_TYPE_RUNNING_RED_LIGHT 一个红灯周期只显示一次
if (!isShowRunRedLight) {
isShowRunRedLight = true
ttsContent =
EventTypeEnumNew.getWarningTts(EventTypeEnumNew.TYPE_USECASE_ID_IVP_RED.poiType)
alertContent =
EventTypeEnumNew.getWarningContent(EventTypeEnumNew.TYPE_USECASE_ID_IVP_RED.poiType)
saveObuData(
EventTypeEnumNew.TYPE_USECASE_ID_IVP_RED.poiType,
alertContent,
ttsContent
)
showWarning(
EventTypeEnumNew.TYPE_USECASE_ID_IVP_RED.poiType,
alertContent,
ttsContent,
WarningDirectionEnum.ALERT_WARNING_NON
)
if (HmiBuildConfig.isShowRunRedLightView) {
if (!isShowRunRedLight) {
isShowRunRedLight = true
ttsContent =
EventTypeEnumNew.getWarningTts(EventTypeEnumNew.TYPE_USECASE_ID_IVP_RED.poiType)
alertContent =
EventTypeEnumNew.getWarningContent(EventTypeEnumNew.TYPE_USECASE_ID_IVP_RED.poiType)
saveObuData(
EventTypeEnumNew.TYPE_USECASE_ID_IVP_RED.poiType,
alertContent,
ttsContent
)
showWarning(
EventTypeEnumNew.TYPE_USECASE_ID_IVP_RED.poiType,
alertContent,
ttsContent,
WarningDirectionEnum.ALERT_WARNING_NON
)
}
}
}
2 -> { //绿波通行引导 V2I_RLVW_VIOLATION_TYPE_NO_VIOLATION 一个绿灯周期只显示一次 100m的时候
if (!isShowGreenWave) {
isShowGreenWave = true
var minSpeedTemp = Math.round(currentLight.suggestMinSpeed * 3.6)
var maxSpeedTemp = Math.round(currentLight.suggestMaxSpeed * 3.6)
if (minSpeedTemp == maxSpeedTemp) {
minSpeedTemp -= 5
}
if (HmiBuildConfig.isShowGreenWaveView) {
if (!isShowGreenWave) {
isShowGreenWave = true
var minSpeedTemp = Math.round(currentLight.suggestMinSpeed * 3.6)
var maxSpeedTemp = Math.round(currentLight.suggestMaxSpeed * 3.6)
if (minSpeedTemp == maxSpeedTemp) {
minSpeedTemp -= 5
}
// val adviceSpeed = "$minSpeedTemp - $maxSpeedTemp"
// val adviceSpeedTts = "$minSpeedTemp 到 $maxSpeedTemp"
@@ -1030,29 +1060,31 @@ class MogoPrivateObuNewManager private constructor() : OnUpgradeListener {
// adviceSpeed
// )
val maxSpeed = currentLight.suggestMaxSpeed
if (maxSpeed > 0) {
var currentSpeed = CallerChassisLocationGCJ02ListenerManager.getChassisLocationGCJ02().gnssSpeed.toDouble()
if (currentSpeed > 0) {
ttsContentNew = if ((currentSpeed * 3.6).roundToInt() in (minSpeedTemp + 1) until maxSpeedTemp) {
"推荐保持当前车速通过路口"
} else {
"推荐保持车速$minSpeedTemp - $maxSpeedTemp KM/H通过路口"
val maxSpeed = currentLight.suggestMaxSpeed
if (maxSpeed > 0) {
var currentSpeed =
CallerChassisLocationGCJ02ListenerManager.getChassisLocationGCJ02().gnssSpeed.toDouble()
if (currentSpeed > 0) {
ttsContentNew =
if ((currentSpeed * 3.6).roundToInt() in (minSpeedTemp + 1) until maxSpeedTemp) {
"蘑菇路侧提醒您,推荐保持当前车速通过路口"
} else {
"蘑菇路侧提醒您,推荐保持车速$minSpeedTemp - $maxSpeedTemp KM/H通过路口"
}
alertContentNew = "推荐车速$minSpeedTemp - $maxSpeedTemp KM/H"
}
alertContentNew = "推荐车速$minSpeedTemp - $maxSpeedTemp KM/H"
saveObuData(
EventTypeEnumNew.TYPE_USECASE_ID_IVP_GREEN.poiType,
alertContentNew,
ttsContentNew
)
showWarning(
EventTypeEnumNew.TYPE_USECASE_ID_IVP_GREEN.poiType,
alertContentNew,
ttsContentNew,
WarningDirectionEnum.ALERT_WARNING_NON
)
}
saveObuData(
EventTypeEnumNew.TYPE_USECASE_ID_IVP_GREEN.poiType,
alertContentNew,
ttsContentNew
)
showWarning(
EventTypeEnumNew.TYPE_USECASE_ID_IVP_GREEN.poiType,
alertContentNew,
ttsContentNew,
WarningDirectionEnum.ALERT_WARNING_NON
)
}
}
}

View File

@@ -103,6 +103,22 @@ internal class SOPSettingView @JvmOverloads constructor(
HmiBuildConfig.isShowObuV2iView = isChecked
}
/**
* obu 闯红灯预警,默认关闭
*/
tbRunRedLightSop.isChecked = HmiBuildConfig.isShowRunRedLightView
tbRunRedLightSop.setOnCheckedChangeListener { _, isChecked ->
HmiBuildConfig.isShowRunRedLightView = isChecked
}
/**
* obu 绿波通行,默认关闭
*/
tbGreenWaveSop.isChecked = HmiBuildConfig.isShowGreenWaveView
tbGreenWaveSop.setOnCheckedChangeListener { _, isChecked ->
HmiBuildConfig.isShowGreenWaveView = isChecked
}
//红绿灯标识
tbTrafficLight.isChecked = HmiBuildConfig.isShowTrafficLightView
tbTrafficLight.setOnCheckedChangeListener { _, isChecked ->

View File

@@ -191,6 +191,34 @@
app:layout_constraintRight_toLeftOf="@id/verticalGuideLine"
/>
<androidx.appcompat.widget.SwitchCompat
android:id="@+id/tbGreenWaveSop"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="绿波通行"
android:paddingTop="25dp"
android:paddingBottom="25dp"
android:scaleY="1.2"
android:scaleX="1.2"
app:layout_constraintTop_toBottomOf="@id/tbCloudWeaknessTrafficSop"
app:layout_constraintLeft_toRightOf="@id/verticalGuideLine"
app:layout_constraintRight_toRightOf="parent"
/>
<androidx.appcompat.widget.SwitchCompat
android:id="@+id/tbRunRedLightSop"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="闯红灯预警"
android:paddingTop="25dp"
android:paddingBottom="25dp"
android:scaleY="1.2"
android:scaleX="1.2"
app:layout_constraintTop_toBottomOf="@id/tbCloudWeaknessTrafficSop"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toLeftOf="@id/verticalGuideLine"
/>
<androidx.appcompat.widget.SwitchCompat
android:id="@+id/tbIPCReport"
android:layout_width="wrap_content"
@@ -200,7 +228,7 @@
android:paddingBottom="25dp"
android:scaleY="1.2"
android:scaleX="1.2"
app:layout_constraintTop_toBottomOf="@id/tbObuWeaknessTrafficSop"
app:layout_constraintTop_toBottomOf="@id/tbGreenWaveSop"
app:layout_constraintRight_toLeftOf="@id/verticalGuideLine"
app:layout_constraintLeft_toLeftOf="parent"
/>

View File

@@ -71,11 +71,18 @@ object HmiBuildConfig {
var isShowObuV2iView = true
/**
* 是否展示obu通过工控机展示的v2i
* 是否展示绿波通行
*/
@JvmField
@Volatile
var isShowObuToDcV2iView = true
var isShowGreenWaveView = false
/**
* 是否展示闯红灯预警
*/
@JvmField
@Volatile
var isShowRunRedLightView = false
}