[2.13.0-arch-opt] fix bug of thread problem and add new func obu fusion and warning union

This commit is contained in:
zhongchao
2023-02-15 21:09:04 +08:00
parent be7f5d419a
commit 4bec76e02d
6 changed files with 150 additions and 41 deletions

View File

@@ -32,6 +32,7 @@ class SteeringBrakeView(context: Context, attrs: AttributeSet?) : ConstraintLayo
private const val TAG = "SteeringBrakeView"
}
@Volatile
private var isShowTurnLight = false
private var brakeLight = -1
@@ -61,11 +62,13 @@ class SteeringBrakeView(context: Context, attrs: AttributeSet?) : ConstraintLayo
"$M_HMI$TAG",
"---onAutopilotLightSwitchData ---Acceleration = " + gnssInfo.acceleration + "-- brakeLight = " + brakeLight
)
if (!isShowTurnLight) { //在不展示转向灯的情况下,展示车辆刹车的动效
brakeView.visibility = View.VISIBLE
brakeView.setBrakeLight(brakeLight)
} else {
brakeView.visibility = View.GONE
ThreadUtils.runOnUiThread {
if (!isShowTurnLight) { //在不展示转向灯的情况下,展示车辆刹车的动效
brakeView.visibility = View.VISIBLE
brakeView.setBrakeLight(brakeLight)
} else {
brakeView.visibility = View.GONE
}
}
}
}