From 9f8d2642683e7e793c18b8deea367fc1c6ba7742 Mon Sep 17 00:00:00 2001 From: xuxinchao Date: Fri, 15 Sep 2023 20:06:00 +0800 Subject: [PATCH] =?UTF-8?q?[6.1.0]=E8=BF=90=E8=90=A5=E9=9D=A2=E6=9D=BF?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../eagle/function/biz/FuncBizProvider.kt | 2 +- .../biz/v2x/overview/OverViewDataManager.kt | 2 +- .../function/biz/v2x/v2n/V2XEventManager.kt | 2 +- .../biz/v2x/v2n/pnc/V2NIdentifyDrawer.kt | 6 +- .../datacenter/obu/MogoObuDcCombineManager.kt | 52 +++--- .../obu/MogoPrivateObuNewManager.kt | 42 ++--- .../function/hmi/ui/setting/SOPSettingView.kt | 167 +++++++++++++++++- .../src/main/res/layout/view_sop_setting.xml | 36 ++-- .../core/data/config/FunctionBuildConfig.kt | 14 ++ .../eagle/core/data/config/HmiBuildConfig.kt | 6 +- .../autopilot/CallerV2XListenerManager.kt | 4 +- 11 files changed, 247 insertions(+), 86 deletions(-) diff --git a/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/FuncBizProvider.kt b/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/FuncBizProvider.kt index 22888ca6e7..e1c42574d3 100644 --- a/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/FuncBizProvider.kt +++ b/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/FuncBizProvider.kt @@ -117,7 +117,7 @@ class FuncBizProvider : IMoGoFuncBizProvider { } override fun queryV2XEvents() { - if ((AppIdentityModeUtils.isTaxi(FunctionBuildConfig.appIdentityMode) && !FunctionBuildConfig.isNewV2NData) + if ((AppIdentityModeUtils.isTaxi(FunctionBuildConfig.appIdentityMode) && (!FunctionBuildConfig.v2nMainSwitch || !FunctionBuildConfig.isNewV2NData)) || AppIdentityModeUtils.isBus(FunctionBuildConfig.appIdentityMode)) { v2xPoiLoader.queryWholeRoadEvents() } diff --git a/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/v2x/overview/OverViewDataManager.kt b/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/v2x/overview/OverViewDataManager.kt index 6685379ae7..21fd03bc72 100644 --- a/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/v2x/overview/OverViewDataManager.kt +++ b/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/v2x/overview/OverViewDataManager.kt @@ -107,7 +107,7 @@ object OverViewDataManager { .observeOn(AndroidSchedulers.mainThread()) .subscribe { it?.apply { - if ((AppIdentityModeUtils.isTaxi(FunctionBuildConfig.appIdentityMode) && !FunctionBuildConfig.isNewV2NData) + if ((AppIdentityModeUtils.isTaxi(FunctionBuildConfig.appIdentityMode) && (!FunctionBuildConfig.v2nMainSwitch || !FunctionBuildConfig.isNewV2NData)) || AppIdentityModeUtils.isBus(FunctionBuildConfig.appIdentityMode)) { CallerFuncBizListenerManager.invokeV2XEvents(this) } diff --git a/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/v2x/v2n/V2XEventManager.kt b/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/v2x/v2n/V2XEventManager.kt index 5e6608263c..153d7b0762 100644 --- a/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/v2x/v2n/V2XEventManager.kt +++ b/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/v2x/v2n/V2XEventManager.kt @@ -169,7 +169,7 @@ object V2XEventManager : IMoGoChassisLocationGCJ02Listener, IV2XCallback, handleRoadMarkerEvent(event.data.toRoadMarker()) } is V2XEvent.RoadEventX -> { - if (!AppIdentityModeUtils.isTaxi(FunctionBuildConfig.appIdentityMode) || !FunctionBuildConfig.isNewV2NData) { + if (!AppIdentityModeUtils.isTaxi(FunctionBuildConfig.appIdentityMode) || !FunctionBuildConfig.v2nMainSwitch || !FunctionBuildConfig.isNewV2NData) { handleRoadMarkerEvent(event.data.toRoadMarker()) } } diff --git a/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/v2x/v2n/pnc/V2NIdentifyDrawer.kt b/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/v2x/v2n/pnc/V2NIdentifyDrawer.kt index 3e75ed1e2d..b2d02ed02c 100644 --- a/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/v2x/v2n/pnc/V2NIdentifyDrawer.kt +++ b/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/v2x/v2n/pnc/V2NIdentifyDrawer.kt @@ -239,21 +239,21 @@ internal object V2NIdentifyDrawer { } private fun drawShiGong(events: List) { - if (AppIdentityModeUtils.isTaxi(FunctionBuildConfig.appIdentityMode) && FunctionBuildConfig.isNewV2NData) { + if (AppIdentityModeUtils.isTaxi(FunctionBuildConfig.appIdentityMode) && FunctionBuildConfig.v2nMainSwitch && FunctionBuildConfig.isNewV2NData) { handler.removeMessages(MSG_WHAT_DRAW_SHIGONE) handler.sendMessage(Message.obtain(handler, MSG_WHAT_DRAW_SHIGONE, events)) } } private fun drawShiGu(events: List) { - if (AppIdentityModeUtils.isTaxi(FunctionBuildConfig.appIdentityMode) && FunctionBuildConfig.isNewV2NData) { + if (AppIdentityModeUtils.isTaxi(FunctionBuildConfig.appIdentityMode) && FunctionBuildConfig.v2nMainSwitch && FunctionBuildConfig.isNewV2NData) { handler.removeMessages(MSG_WHAT_DRAW_SHIGU) handler.sendMessage(Message.obtain(handler, MSG_WHAT_DRAW_SHIGU, events)) } } private fun drawYongDu(events: List) { - if (AppIdentityModeUtils.isTaxi(FunctionBuildConfig.appIdentityMode) && FunctionBuildConfig.isNewV2NData) { + if (AppIdentityModeUtils.isTaxi(FunctionBuildConfig.appIdentityMode) && FunctionBuildConfig.v2nMainSwitch && FunctionBuildConfig.isNewV2NData) { handler.removeMessages(MSG_WHAT_DRAW_YONGDU) handler.sendMessage(Message.obtain(handler, MSG_WHAT_DRAW_YONGDU, events)) } diff --git a/core/function-impl/mogo-core-function-datacenter/src/main/java/com/mogo/eagle/core/function/datacenter/obu/MogoObuDcCombineManager.kt b/core/function-impl/mogo-core-function-datacenter/src/main/java/com/mogo/eagle/core/function/datacenter/obu/MogoObuDcCombineManager.kt index 9439104f36..424c033cc7 100644 --- a/core/function-impl/mogo-core-function-datacenter/src/main/java/com/mogo/eagle/core/function/datacenter/obu/MogoObuDcCombineManager.kt +++ b/core/function-impl/mogo-core-function-datacenter/src/main/java/com/mogo/eagle/core/function/datacenter/obu/MogoObuDcCombineManager.kt @@ -561,32 +561,34 @@ class MogoObuDcCombineManager private constructor() : IMoGoObuWarningRsiListener } 1 -> { //闯红灯 V2I_RLVW_VIOLATION_TYPE_RUNNING_RED_LIGHT 一个红灯周期只显示一次 - 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 + if(HmiBuildConfig.isShowObuV2iView){ + 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, + CommunicationType.V2I + ) + showWarning( + EventTypeEnumNew.TYPE_USECASE_ID_IVP_RED.poiType, + alertContent, + ttsContent, + WarningDirectionEnum.ALERT_WARNING_NON + ) } - saveObuToDcData( - EventTypeEnumNew.TYPE_USECASE_ID_IVP_RED.poiType, - alertContent, - ttsContent, - CommunicationType.V2I - ) - showWarning( - EventTypeEnumNew.TYPE_USECASE_ID_IVP_RED.poiType, - alertContent, - ttsContent, - WarningDirectionEnum.ALERT_WARNING_NON - ) } } } diff --git a/core/function-impl/mogo-core-function-datacenter/src/main/java/com/mogo/eagle/core/function/datacenter/obu/MogoPrivateObuNewManager.kt b/core/function-impl/mogo-core-function-datacenter/src/main/java/com/mogo/eagle/core/function/datacenter/obu/MogoPrivateObuNewManager.kt index e62c7c8d5a..1b42daf359 100644 --- a/core/function-impl/mogo-core-function-datacenter/src/main/java/com/mogo/eagle/core/function/datacenter/obu/MogoPrivateObuNewManager.kt +++ b/core/function-impl/mogo-core-function-datacenter/src/main/java/com/mogo/eagle/core/function/datacenter/obu/MogoPrivateObuNewManager.kt @@ -299,7 +299,7 @@ class MogoPrivateObuNewManager private constructor() : OnUpgradeListener { * v2v预警信息 CvxRvInfoIndInfo CvxV2vThreatIndInfo 他车 */ override fun onObuRvWarning(data: ObuScene.RvWarningData) { - if (HmiBuildConfig.isShowObuV2vView) { + if (FunctionBuildConfig.v2xMainSwitch && HmiBuildConfig.isShowObuV2vView) { if (data.warningMsg != null) { // 更新数据,远车数据,之前要匹配uuid data.vehBasicsMsg?.let { @@ -1042,25 +1042,27 @@ class MogoPrivateObuNewManager private constructor() : OnUpgradeListener { } 1 -> {//闯红灯 V2I_RLVW_VIOLATION_TYPE_RUNNING_RED_LIGHT 一个红灯周期只显示一次 - 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, - CommunicationType.V2I - ) - showWarning( - EventTypeEnumNew.TYPE_USECASE_ID_IVP_RED.poiType, - alertContent, - ttsContent, - WarningDirectionEnum.ALERT_WARNING_NON - ) + if(HmiBuildConfig.isShowObuV2iView){ + 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, + CommunicationType.V2I + ) + showWarning( + EventTypeEnumNew.TYPE_USECASE_ID_IVP_RED.poiType, + alertContent, + ttsContent, + WarningDirectionEnum.ALERT_WARNING_NON + ) + } } } } diff --git a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/setting/SOPSettingView.kt b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/setting/SOPSettingView.kt index 9f9700b99f..cf3c508c39 100644 --- a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/setting/SOPSettingView.kt +++ b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/setting/SOPSettingView.kt @@ -2,6 +2,7 @@ package com.mogo.eagle.core.function.hmi.ui.setting import android.content.Context import android.util.AttributeSet +import android.util.Log import android.view.LayoutInflater import android.view.View import android.widget.Toast @@ -50,6 +51,11 @@ internal class SOPSettingView @JvmOverloads constructor( const val TAG = "SOPSettingView" } + /** + * OBU连接状态 + */ + private var obuConnectStatus = false + init { LayoutInflater.from(context).inflate(R.layout.view_sop_setting, this, true) initView() @@ -71,9 +77,139 @@ internal class SOPSettingView @JvmOverloads constructor( * V2X消息设置 */ private fun v2xSetting(){ + //V2X总开关 + scV2XSwitch.isChecked = FunctionBuildConfig.v2xMainSwitch + scV2XSwitch.setOnCheckedChangeListener { _, isChecked -> + FunctionBuildConfig.v2xMainSwitch = isChecked + if(isChecked){ + //V2N总开关 + scV2NSwitch.isChecked = FunctionBuildConfig.v2nMainSwitch + hmiAction("SOP V2N总开关, ",FunctionBuildConfig.v2nMainSwitch) + //V2I总开关 + scV2ISwitch.isChecked = HmiBuildConfig.isShowObuV2iView + hmiAction("SOP V2I总开关, ",HmiBuildConfig.isShowObuV2iView) + //V2V总开关 + scObuV2vView.isChecked = HmiBuildConfig.isShowObuV2vView + hmiAction("SOP V2V总开关, ",HmiBuildConfig.isShowObuV2vView) + //obu总开关 + scObu.isChecked = obuConnectStatus + hmiAction("SOP obu总开关, ",obuConnectStatus) + if(obuConnectStatus){ + CallerObuApiManager.resetObuIpAddress(MogoObuConst.OBU_DEFAULT_IP) + } + }else{ + //V2N总开关 + scV2NSwitch.isChecked = false + //V2I总开关 + scV2ISwitch.isChecked = false + //V2V总开关 + scObuV2vView.isChecked = false + hmiAction("SOP obuV2V开关, ",false) + //obu总开关 + scObu.isChecked = false + hmiAction("SOP OBU控制总开关, ",false) + //断开链接 + CallerObuApiManager.disConnectObu() + } + scV2NSwitch.isEnabled = isChecked + scV2ISwitch.isEnabled = isChecked + scObuV2vView.isEnabled = isChecked + scObu.isEnabled = isChecked + } + + //V2N总开关 + scV2NSwitch.isChecked = FunctionBuildConfig.v2nMainSwitch + //根据V2N状态设置子开关是否可以点击 + //V2N新链路 + scNewV2NData.isEnabled = FunctionBuildConfig.v2nMainSwitch + //V2N场景进PNC + scV2nPnc.isEnabled = FunctionBuildConfig.v2nMainSwitch + //绿波通行(默认关闭) + scGreenWaveSop.isEnabled = FunctionBuildConfig.v2nMainSwitch + scV2NSwitch.setOnCheckedChangeListener { compoundButton, isChecked -> + if(isChecked){ + //V2N新链路 + scNewV2NData.isChecked = FunctionBuildConfig.isNewV2NData + hmiAction("SOP 是否是V2N新链路(云->工控机->App)",FunctionBuildConfig.isNewV2NData) + //V2N场景进PNC + scV2nPnc.isChecked = FunctionBuildConfig.isV2NPnc + hmiAction("SOP V2N场景进PNC, ",FunctionBuildConfig.isV2NPnc) + CallerAutoPilotControlManager.sendV2nToPncCmd(FunctionBuildConfig.isV2NPnc) + //绿波通行 + scGreenWaveSop.isChecked = HmiBuildConfig.isShowGreenWaveView + hmiAction("SOP obu绿波通行, ",HmiBuildConfig.isShowGreenWaveView) + CallerTelematicManager.sendMsgToAllClients(TelematicConstant.OBU_GREENWAVE_WARNING, "1".toByteArray()) + }else{ + //V2N新链路 + scNewV2NData.isChecked = false + hmiAction("SOP 是否是V2N新链路(云->工控机->App)",false) + //V2N场景进PNC + scV2nPnc.isChecked = false + hmiAction("SOP V2N场景进PNC, ",false) + CallerAutoPilotControlManager.sendV2nToPncCmd(false) + //绿波通行 + scGreenWaveSop.isChecked = false + hmiAction("SOP obu绿波通行, ",false) + CallerTelematicManager.sendMsgToAllClients(TelematicConstant.OBU_GREENWAVE_WARNING, "0".toByteArray()) + } + scNewV2NData.isEnabled = isChecked + scV2nPnc.isEnabled = isChecked + scGreenWaveSop.isEnabled = isChecked + if(!compoundButton.isPressed){ + return@setOnCheckedChangeListener + } + FunctionBuildConfig.v2nMainSwitch = isChecked + } + + //V2I总开关 + scV2ISwitch.isChecked = HmiBuildConfig.isShowObuV2iView //是否展示obu的v2i + //根据V2I状态设置子开关是否可以点击 + scV2iPnc.isEnabled = HmiBuildConfig.isShowObuV2iView + scRunRedLightSop.isEnabled = HmiBuildConfig.isShowObuV2iView + scObuWeaknessTrafficSop.isEnabled = HmiBuildConfig.isShowObuV2iView + scV2ISwitch.setOnCheckedChangeListener { compoundButton, isChecked -> + if(isChecked){ + //V2I场景进PNC + scV2iPnc.isChecked = FunctionBuildConfig.isV2IPnc + hmiAction("SOP V2I场景进PNC, ",FunctionBuildConfig.isV2IPnc) + CallerAutoPilotControlManager.sendV2iToPncCmd(FunctionBuildConfig.isV2IPnc) + //闯红灯预警 + scRunRedLightSop.isChecked = HmiBuildConfig.isShowRunRedLightView + hmiAction("SOP obu闯红灯预警, ",HmiBuildConfig.isShowRunRedLightView) + CallerTelematicManager.sendMsgToAllClients(TelematicConstant.OBU_RUNREDLIGHT_WARNING, "1".toByteArray()) + //路侧弱势交通参与者 + scObuWeaknessTrafficSop.isChecked = HmiBuildConfig.isShowObuWeaknessTrafficView + hmiAction("SOP obu弱势交通控制, ",HmiBuildConfig.isShowObuWeaknessTrafficView) + }else{ + //V2I场景进PNC + scV2iPnc.isChecked = false + CallerAutoPilotControlManager.sendV2iToPncCmd(false) + hmiAction("SOP V2I场景进PNC, ",false) + //闯红灯预警 + scRunRedLightSop.isChecked = false + hmiAction("SOP obu闯红灯预警, ",false) + CallerTelematicManager.sendMsgToAllClients(TelematicConstant.OBU_RUNREDLIGHT_WARNING, "0".toByteArray()) + + //路侧弱势交通参与者 + scObuWeaknessTrafficSop.isChecked = false + + hmiAction("SOP obu弱势交通控制, ",false) + } + scV2iPnc.isEnabled = isChecked + scRunRedLightSop.isEnabled = isChecked + scObuWeaknessTrafficSop.isEnabled = isChecked + if(!compoundButton.isPressed){ + return@setOnCheckedChangeListener + } + HmiBuildConfig.isShowObuV2iView = isChecked + } + //V2N新链路 scNewV2NData.isChecked = FunctionBuildConfig.isNewV2NData - scNewV2NData.setOnCheckedChangeListener { _, isChecked -> + scNewV2NData.setOnCheckedChangeListener { compoundButton, isChecked -> + if(!compoundButton.isPressed){ + return@setOnCheckedChangeListener + } hmiAction("SOP 是否是V2N新链路(云->工控机->App)",isChecked) FunctionBuildConfig.isNewV2NData = isChecked } @@ -91,7 +227,10 @@ internal class SOPSettingView @JvmOverloads constructor( //绿波通行(默认关闭) scGreenWaveSop.isChecked = HmiBuildConfig.isShowGreenWaveView - scGreenWaveSop.setOnCheckedChangeListener { _, isChecked -> + scGreenWaveSop.setOnCheckedChangeListener { compoundButton, isChecked -> + if(!compoundButton.isPressed){ + return@setOnCheckedChangeListener + } hmiAction("SOP obu绿波通行, ",isChecked) HmiBuildConfig.isShowGreenWaveView = isChecked if (HmiBuildConfig.isShowGreenWaveView) { @@ -114,7 +253,10 @@ internal class SOPSettingView @JvmOverloads constructor( //闯红灯预警(默认关闭) scRunRedLightSop.isChecked = HmiBuildConfig.isShowRunRedLightView - scRunRedLightSop.setOnCheckedChangeListener { _, isChecked -> + scRunRedLightSop.setOnCheckedChangeListener { compoundButton, isChecked -> + if(!compoundButton.isPressed){ + return@setOnCheckedChangeListener + } hmiAction("SOP obu闯红灯预警, ",isChecked) HmiBuildConfig.isShowRunRedLightView = isChecked if (HmiBuildConfig.isShowRunRedLightView) { @@ -126,21 +268,31 @@ internal class SOPSettingView @JvmOverloads constructor( //路侧弱势交通参与者(默认开启) scObuWeaknessTrafficSop.isChecked = HmiBuildConfig.isShowObuWeaknessTrafficView - scObuWeaknessTrafficSop.setOnCheckedChangeListener { _, isChecked -> + scObuWeaknessTrafficSop.setOnCheckedChangeListener { compoundButton, isChecked -> + if(!compoundButton.isPressed){ + return@setOnCheckedChangeListener + } hmiAction("SOP obu弱势交通控制, ",isChecked) HmiBuildConfig.isShowObuWeaknessTrafficView = isChecked } //V2V总开关(默认关闭) scObuV2vView.isChecked = HmiBuildConfig.isShowObuV2vView - scObuV2vView.setOnCheckedChangeListener { _, isChecked -> + scObuV2vView.setOnCheckedChangeListener { compoundButton, isChecked -> + if(!compoundButton.isPressed){ + return@setOnCheckedChangeListener + } hmiAction("SOP obuV2V开关, ",isChecked) HmiBuildConfig.isShowObuV2vView = isChecked } //obu总开关 - scObu.isChecked = CallerObuApiManager.isConnected() - scObu.setOnCheckedChangeListener { _, isChecked -> + obuConnectStatus = CallerObuApiManager.isConnected() + scObu.isChecked = obuConnectStatus + scObu.setOnCheckedChangeListener { compoundButton, isChecked -> + if(!compoundButton.isPressed){ + return@setOnCheckedChangeListener + } hmiAction("SOP OBU控制总开关, ",isChecked) if (isChecked) { CallerObuApiManager.resetObuIpAddress(MogoObuConst.OBU_DEFAULT_IP) @@ -298,6 +450,7 @@ internal class SOPSettingView @JvmOverloads constructor( } //限速标识 + //TODO scSpeedLimit.isChecked = HmiBuildConfig.isShowLimitingVelocityView scSpeedLimit.setOnCheckedChangeListener { _, isChecked -> hmiAction("SOP 限速标识开关, ",isChecked) diff --git a/core/function-impl/mogo-core-function-hmi/src/main/res/layout/view_sop_setting.xml b/core/function-impl/mogo-core-function-hmi/src/main/res/layout/view_sop_setting.xml index eb00657456..911d7794e8 100644 --- a/core/function-impl/mogo-core-function-hmi/src/main/res/layout/view_sop_setting.xml +++ b/core/function-impl/mogo-core-function-hmi/src/main/res/layout/view_sop_setting.xml @@ -36,16 +36,15 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="V2X总开关" - android:textColor="@color/black" android:textSize="@dimen/sp_28" app:layout_constraintTop_toTopOf="parent" - app:layout_constraintLeft_toLeftOf="parent" - android:scaleY="1.6" - android:scaleX="1.6" - android:layout_marginStart="@dimen/dp_30" + app:layout_constraintStart_toStartOf="parent" + android:scaleY="1.4" + android:scaleX="1.4" + android:layout_marginStart="@dimen/dp_50" android:layout_marginTop="@dimen/dp_20" /> - + @@ -224,8 +223,8 @@ android:textColor="@color/black" app:layout_constraintTop_toTopOf="parent" app:layout_constraintLeft_toLeftOf="parent" - android:layout_marginStart="@dimen/dp_30" - android:layout_marginTop="@dimen/dp_20" + android:layout_marginStart="@dimen/dp_10" + android:layout_marginTop="@dimen/dp_10" /> 工控机->App) */ diff --git a/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/config/HmiBuildConfig.kt b/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/config/HmiBuildConfig.kt index 56650dc01c..c6cf55dac2 100644 --- a/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/config/HmiBuildConfig.kt +++ b/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/config/HmiBuildConfig.kt @@ -13,7 +13,7 @@ object HmiBuildConfig { * 是否显示 限速UI */ @JvmField - var isShowLimitingVelocityView = true + var isShowLimitingVelocityView = false /** * 是否显示 红绿等 @@ -40,7 +40,7 @@ object HmiBuildConfig { */ @JvmField @Volatile - var isShowObuWeaknessTrafficView = true + var isShowObuWeaknessTrafficView = false /** * 是否展示云端的弱势交通 @@ -61,7 +61,7 @@ object HmiBuildConfig { */ @JvmField @Volatile - var isShowObuV2iView = true + var isShowObuV2iView = false /** * 是否展示绿波通行 diff --git a/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/autopilot/CallerV2XListenerManager.kt b/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/autopilot/CallerV2XListenerManager.kt index ca42e140a6..0123b30139 100644 --- a/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/autopilot/CallerV2XListenerManager.kt +++ b/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/autopilot/CallerV2XListenerManager.kt @@ -20,7 +20,7 @@ object CallerV2XListenerManager : CallerBase() { override fun doSomeAfterAddListener(tag: String, listener: IMoGoV2XListener) { if (eventCountTmp >= 0) { - if (AppIdentityModeUtils.isTaxi(FunctionBuildConfig.appIdentityMode) && FunctionBuildConfig.isNewV2NData) { + if (AppIdentityModeUtils.isTaxi(FunctionBuildConfig.appIdentityMode) && FunctionBuildConfig.v2nMainSwitch && FunctionBuildConfig.isNewV2NData) { listener.onV2nGlobalPathEvents(eventCountTmp, constructTmp, triangleTmp, congestionTmp, parkingViolationTmp) } } @@ -37,7 +37,7 @@ object CallerV2XListenerManager : CallerBase() { parkingViolationTmp = parkingViolation M_LISTENERS.forEach { val listener = it.value - if (AppIdentityModeUtils.isTaxi(FunctionBuildConfig.appIdentityMode) && FunctionBuildConfig.isNewV2NData) { + if (AppIdentityModeUtils.isTaxi(FunctionBuildConfig.appIdentityMode) && FunctionBuildConfig.v2nMainSwitch && FunctionBuildConfig.isNewV2NData) { listener.onV2nGlobalPathEvents(eventCount, construct, triangle, congestion, parkingViolation) } }