[dev_arch_opt_3.0]

[Change]
[
1、修复清扫车红绿灯展示
]

Signed-off-by: donghongyu <donghongyu@zhidaoauto.com>
This commit is contained in:
donghongyu
2023-02-01 20:08:09 +08:00
parent fdecd41783
commit 6bfef5fa43
2 changed files with 6 additions and 7 deletions

View File

@@ -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() {

View File

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