add logic of pnc view show need autopilot is 2

This commit is contained in:
zhongchao
2022-09-09 09:49:35 +08:00
parent 3ef570d30b
commit 4e1b4fa9d1

View File

@@ -12,6 +12,7 @@ import com.mogo.eagle.core.data.trafficlight.isRed
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotPlanningActionsListener
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener.Companion.STATUS_AUTOPILOT_RUNNING
import com.mogo.eagle.core.function.api.trafficlight.IMoGoTrafficLightListener
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager.getAutoPilotStatusInfo
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotPlanningActionsListenerManager
import com.mogo.eagle.core.function.call.trafficlight.CallerTrafficLightListenerManager
@@ -51,6 +52,9 @@ class PncActionsView @JvmOverloads constructor(
}
override fun pncActions(planningActionMsg: MessagePad.PlanningActionMsg) {
if(getAutoPilotStatusInfo().state != STATUS_AUTOPILOT_RUNNING){
return
}
UiThreadHandler.post {
var actions: String? = null
planningActionMsg.actionMsg?.let {