[2.14.0] fix bug
This commit is contained in:
@@ -74,16 +74,23 @@ class PncActionsView @JvmOverloads constructor(
|
||||
override fun pncActions(planningActionMsg: MessagePad.PlanningActionMsg) {
|
||||
try {
|
||||
mAutoPilotStatusInfo?.let { it ->
|
||||
if (it.state == STATUS_AUTOPILOT_RUNNING) {
|
||||
UiThreadHandler.post {
|
||||
UiThreadHandler.post {
|
||||
if (it.state == STATUS_AUTOPILOT_RUNNING) {
|
||||
var actions: String? = null
|
||||
planningActionMsg.actionMsg?.let {
|
||||
actions = PncActionsHelper.getAction(it.drivingState.number, it.drivingAction.number)
|
||||
actions = PncActionsHelper.getAction(
|
||||
it.drivingState.number,
|
||||
it.drivingAction.number
|
||||
)
|
||||
|
||||
//如果是存在云端红绿灯数据条件下,设置云端数据
|
||||
if (PncActionsHelper.isWaitingTrafficlight(it.drivingState.number, it.drivingAction.number)
|
||||
if (PncActionsHelper.isWaitingTrafficlight(
|
||||
it.drivingState.number,
|
||||
it.drivingAction.number
|
||||
)
|
||||
&& mTrafficLightResult != null
|
||||
&& getWaitTrafficlightTime().isNotBlank()) {
|
||||
&& getWaitTrafficlightTime().isNotBlank()
|
||||
) {
|
||||
actions += ",预计${getWaitTrafficlightTime()}秒后通过"
|
||||
} else {
|
||||
mTrafficLightResult = null
|
||||
@@ -94,16 +101,18 @@ class PncActionsView @JvmOverloads constructor(
|
||||
this.background = null
|
||||
tvHmiPncActions.text = ""
|
||||
} else {
|
||||
this.background = AppCompatResources.getDrawable(context, R.drawable.pnc_actions_bg)
|
||||
this.background =
|
||||
AppCompatResources.getDrawable(context, R.drawable.pnc_actions_bg)
|
||||
tvHmiPncActions.text = actions
|
||||
}
|
||||
|
||||
} else {
|
||||
this.background = null
|
||||
tvHmiPncActions.text = ""
|
||||
}
|
||||
}else{
|
||||
this.background = null
|
||||
tvHmiPncActions.text = ""
|
||||
}
|
||||
}
|
||||
}catch (e:Exception){
|
||||
} catch (e: Exception) {
|
||||
e.printStackTrace()
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user