From 6bfef5fa43003837f5f04138ec8761550173fe84 Mon Sep 17 00:00:00 2001 From: donghongyu Date: Wed, 1 Feb 2023 20:08:09 +0800 Subject: [PATCH] =?UTF-8?q?[dev=5Farch=5Fopt=5F3.0]=20[Change]=20[=201?= =?UTF-8?q?=E3=80=81=E4=BF=AE=E5=A4=8D=E6=B8=85=E6=89=AB=E8=BD=A6=E7=BA=A2?= =?UTF-8?q?=E7=BB=BF=E7=81=AF=E5=B1=95=E7=A4=BA=20]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: donghongyu --- .../com/mogo/och/sweeper/view/SweeperTrafficDataView.kt | 5 ----- .../com/mogo/och/sweeper/view/SweeperTrafficLightView.kt | 8 ++++++-- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/OCH/mogo-och-sweeper/src/main/java/com/mogo/och/sweeper/view/SweeperTrafficDataView.kt b/OCH/mogo-och-sweeper/src/main/java/com/mogo/och/sweeper/view/SweeperTrafficDataView.kt index 3e05460226..097286098d 100644 --- a/OCH/mogo-och-sweeper/src/main/java/com/mogo/och/sweeper/view/SweeperTrafficDataView.kt +++ b/OCH/mogo-och-sweeper/src/main/java/com/mogo/och/sweeper/view/SweeperTrafficDataView.kt @@ -15,7 +15,6 @@ import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisGearStateListener import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisLamplightListener import com.mogo.eagle.core.function.api.autopilot.IMoGoSweeperFutianCleanSystemListener import com.mogo.eagle.core.function.call.autopilot.* -import com.mogo.eagle.core.function.call.hmi.CallerHmiManager.setProxyTrafficLightView import com.mogo.eagle.core.function.hmi.ui.widget.TapPositionView import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger.d import com.mogo.eagle.core.utilcode.util.ThreadUtils @@ -45,8 +44,6 @@ class SweeperTrafficDataView : ConstraintLayout, : ImageView? = null private var ivWater //水位图标 : ImageView? = null - private var trafficLight //红绿灯 - : SweeperTrafficLightView? = null private val TAG = "SweeperTrafficDataView" @@ -67,7 +64,6 @@ class SweeperTrafficDataView : ConstraintLayout, tvBattery = findViewById(R.id.tvBattery) ivBgWaterWarning = findViewById(R.id.sweeperIvBgWaterWarning) ivWater = findViewById(R.id.sweeperIvWater) - trafficLight = findViewById(R.id.sweeperTrafficLight) } override fun onAttachedToWindow() { @@ -76,7 +72,6 @@ class SweeperTrafficDataView : ConstraintLayout, CallerChassisLamplightListenerManager.addListener(TAG, this) CallerChassisGearStateListenerManager.addListener(TAG, this) CallerSweeperFutianCleanSystemListenerManager.addListener(TAG, this) - setProxyTrafficLightView(trafficLight!!) } override fun onDetachedFromWindow() { diff --git a/OCH/mogo-och-sweeper/src/main/java/com/mogo/och/sweeper/view/SweeperTrafficLightView.kt b/OCH/mogo-och-sweeper/src/main/java/com/mogo/och/sweeper/view/SweeperTrafficLightView.kt index 2e199a83b4..2711755d3d 100644 --- a/OCH/mogo-och-sweeper/src/main/java/com/mogo/och/sweeper/view/SweeperTrafficLightView.kt +++ b/OCH/mogo-och-sweeper/src/main/java/com/mogo/och/sweeper/view/SweeperTrafficLightView.kt @@ -64,7 +64,8 @@ class SweeperTrafficLightView @JvmOverloads constructor( override fun disableTrafficLight() { UiThreadHandler.post { mCurrentLightId = TrafficLightEnum.BLACK - this@SweeperTrafficLightView.visibility = GONE + sweeper_traffic_light_iv.setBackgroundResource(R.drawable.sweeper_light_gay_nor) + this@SweeperTrafficLightView.visibility = VISIBLE } } @@ -132,7 +133,10 @@ class SweeperTrafficLightView @JvmOverloads constructor( sweeper_traffic_light_iv.setBackgroundResource(R.drawable.sweeper_light_green_nor) this@SweeperTrafficLightView.visibility = VISIBLE } - else -> this@SweeperTrafficLightView.visibility = GONE + else -> { + sweeper_traffic_light_iv.setBackgroundResource(R.drawable.sweeper_light_gay_nor) + this@SweeperTrafficLightView.visibility = VISIBLE + } } } }