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 + } } } }