From 942be811c42da2f5037f334477cde132a0a5edf8 Mon Sep 17 00:00:00 2001 From: lixiaopeng Date: Tue, 10 Jan 2023 18:24:57 +0800 Subject: [PATCH] =?UTF-8?q?[2.13.2]=20=E4=BF=AE=E6=94=B9=E9=A2=84=E8=AD=A6?= =?UTF-8?q?=E6=8F=90=E7=A4=BA=EF=BC=8C=E6=B7=BB=E5=8A=A0=E7=BA=A2=E7=BB=BF?= =?UTF-8?q?=E7=81=AF=E7=9A=84=E6=9D=A5=E6=BA=90=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../hmi/ui/widget/SingleTrafficLightView.kt | 27 ++++++++++--------- .../obu/mogo/MogoPrivateObuManager.kt | 6 ++--- .../obu/mogo/MogoPrivateObuNewManager.kt | 9 ++++--- .../core/TrafficLightDispatcher.kt | 2 -- .../function/call/hmi/CallerHmiManager.kt | 2 +- 5 files changed, 24 insertions(+), 22 deletions(-) diff --git a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/widget/SingleTrafficLightView.kt b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/widget/SingleTrafficLightView.kt index 12842094df..f0d289f626 100644 --- a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/widget/SingleTrafficLightView.kt +++ b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/widget/SingleTrafficLightView.kt @@ -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() +// } } } \ No newline at end of file diff --git a/core/function-impl/mogo-core-function-obu-mogo/src/main/java/com/mogo/eagle/core/function/obu/mogo/MogoPrivateObuManager.kt b/core/function-impl/mogo-core-function-obu-mogo/src/main/java/com/mogo/eagle/core/function/obu/mogo/MogoPrivateObuManager.kt index b0ad3af2fe..ea71e56e3f 100644 --- a/core/function-impl/mogo-core-function-obu-mogo/src/main/java/com/mogo/eagle/core/function/obu/mogo/MogoPrivateObuManager.kt +++ b/core/function-impl/mogo-core-function-obu-mogo/src/main/java/com/mogo/eagle/core/function/obu/mogo/MogoPrivateObuManager.kt @@ -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) //防止数据出现问题的容错 diff --git a/core/function-impl/mogo-core-function-obu-mogo/src/main/java/com/mogo/eagle/core/function/obu/mogo/MogoPrivateObuNewManager.kt b/core/function-impl/mogo-core-function-obu-mogo/src/main/java/com/mogo/eagle/core/function/obu/mogo/MogoPrivateObuNewManager.kt index c37886b8bf..c7d1a0b567 100644 --- a/core/function-impl/mogo-core-function-obu-mogo/src/main/java/com/mogo/eagle/core/function/obu/mogo/MogoPrivateObuNewManager.kt +++ b/core/function-impl/mogo-core-function-obu-mogo/src/main/java/com/mogo/eagle/core/function/obu/mogo/MogoPrivateObuNewManager.kt @@ -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) } diff --git a/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/trafficlight/core/TrafficLightDispatcher.kt b/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/trafficlight/core/TrafficLightDispatcher.kt index 90c0cad445..13d5736a55 100644 --- a/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/trafficlight/core/TrafficLightDispatcher.kt +++ b/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/trafficlight/core/TrafficLightDispatcher.kt @@ -109,8 +109,6 @@ class TrafficLightDispatcher : IMoGoAutopilotIdentifyListener , IMoGoTrafficLigh hasAiLightStatus = false }, 5000) } - - } /** diff --git a/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/hmi/CallerHmiManager.kt b/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/hmi/CallerHmiManager.kt index 93429c52c0..46e8660a69 100644 --- a/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/hmi/CallerHmiManager.kt +++ b/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/hmi/CallerHmiManager.kt @@ -184,7 +184,7 @@ object CallerHmiManager : CallerBase() { * 展示红绿灯预警 * * @param checkLightId 0-都是默认,1-红,2-黄,3-绿 - * @param lightSource 1:云端下发;2:自车感知 + * @param lightSource 1:云端下发;2:自车感知;3:OBU */ fun showWarningTrafficLight(checkLightId: Int, lightSource: Int) { waringProviderApi?.showWarningTrafficLight(checkLightId, lightSource)