优化刹车灯逻辑

This commit is contained in:
lixiaopeng
2022-07-15 11:40:05 +08:00
parent ddd0d4ffe8
commit adbd5804da
3 changed files with 9 additions and 3 deletions

View File

@@ -954,6 +954,7 @@ import java.util.*
*/
override fun showTurnLight(light: Int) {
if (HmiBuildConfig.isShowTurnLightView) {
Log.e("liyz", "showTurnLight light = $light")
ThreadUtils.runOnUiThread {
if (light == 1) {
if (!isLeftLight) {
@@ -993,6 +994,7 @@ import java.util.*
*/
override fun showBrakeLight(light: Int) {
if (HmiBuildConfig.isShowBrakeLightView) {
Log.e("liyz", "showBrakeLight isBrake = $isBrake")
ThreadUtils.runOnUiThread {
if (light == 1) { //刹车灯亮
if (!isBrake) {
@@ -1000,8 +1002,10 @@ import java.util.*
CallerMapUIServiceManager.getMapUIController()?.setCarLightsType(0, 500)
}
} else {
isBrake = false
CallerMapUIServiceManager.getMapUIController()?.setCarLightsType(3, 500)
if (isBrake) {
isBrake = false
CallerMapUIServiceManager.getMapUIController()?.setCarLightsType(3, 500)
}
}
// brakeView?.let {