[644][adas] 能否启动自驾 添加原始数据日志
This commit is contained in:
@@ -18,7 +18,7 @@ import com.mogo.eagle.core.function.call.autopilot.CallerChassisThrottleStateLis
|
||||
import com.mogo.eagle.core.function.main.MainLauncherActivity
|
||||
import com.mogo.eagle.core.utilcode.util.ToastUtils
|
||||
import com.zhjt.mogo.adas.data.bean.MogoReport
|
||||
import com.zhjt.mogo.adas.data.bean.UnableLaunchData
|
||||
import com.zhjt.mogo.adas.data.bean.LaunchConditionData
|
||||
import com.zhjt.mogo.adas.data.bean.UnableLaunchReason
|
||||
import com.zhjt.mogo.adas.data.bean.UnableLaunchReason.SourceType.CHASSIS
|
||||
import com.zhjt.mogo.adas.data.bean.UnableLaunchReason.UnableType.CHASSIS_BRAKE
|
||||
@@ -146,38 +146,92 @@ class TestAutoPilotBeforeLaunch {
|
||||
CallerAutopilotActionsListenerManager.setConnected(true)
|
||||
CallerAutoPilotStatusListenerManager.getAutoPilotStatusInfo().state = IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_ENABLE
|
||||
if (flag == 1) {
|
||||
CallerAutopilotActionsListenerManager.invokeAutopilotAbility(false, UnableLaunchData("", SystemStatusInfo.StatusInfo.getDefaultInstance().toBuilder().setSysState(SYS_RUNNING).build(), SsmStatusInf.getDefaultInstance().toBuilder().setModeState(ModeState.MODE_RUN_READY).setAutoPilotReady(false).setRemotePilotReady(false).build(), FSMStatusReasonRespond.getDefaultInstance()), ArrayList<UnableLaunchReason>().also {
|
||||
CallerAutopilotActionsListenerManager.invokeAutopilotAbility(false,
|
||||
LaunchConditionData(
|
||||
"",
|
||||
SystemStatusInfo.StatusInfo.getDefaultInstance().toBuilder()
|
||||
.setSysState(SYS_RUNNING).build(),
|
||||
SsmStatusInf.getDefaultInstance().toBuilder()
|
||||
.setModeState(ModeState.MODE_RUN_READY).setAutoPilotReady(false)
|
||||
.setRemotePilotReady(false).build(),
|
||||
FSMStatusReasonRespond.getDefaultInstance()
|
||||
), ArrayList<UnableLaunchReason>().also {
|
||||
it += UnableLaunchReason(CHASSIS, CHASSIS_GEAR, "gear")
|
||||
})
|
||||
}
|
||||
|
||||
if (flag == 2) {
|
||||
CallerAutopilotActionsListenerManager.invokeAutopilotAbility(false, UnableLaunchData("", SystemStatusInfo.StatusInfo.getDefaultInstance().toBuilder().setSysState(SYS_RUNNING).build(), SsmStatusInf.getDefaultInstance().toBuilder().setModeState(ModeState.MODE_RUN_READY).setAutoPilotReady(false).setRemotePilotReady(false).build(), FSMStatusReasonRespond.getDefaultInstance()), ArrayList<UnableLaunchReason>().also {
|
||||
CallerAutopilotActionsListenerManager.invokeAutopilotAbility(false,
|
||||
LaunchConditionData(
|
||||
"",
|
||||
SystemStatusInfo.StatusInfo.getDefaultInstance().toBuilder()
|
||||
.setSysState(SYS_RUNNING).build(),
|
||||
SsmStatusInf.getDefaultInstance().toBuilder()
|
||||
.setModeState(ModeState.MODE_RUN_READY).setAutoPilotReady(false)
|
||||
.setRemotePilotReady(false).build(),
|
||||
FSMStatusReasonRespond.getDefaultInstance()
|
||||
), ArrayList<UnableLaunchReason>().also {
|
||||
it += UnableLaunchReason(CHASSIS, CHASSIS_STEERING, "steering")
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
if (flag == 3) {
|
||||
CallerAutopilotActionsListenerManager.invokeAutopilotAbility(false, UnableLaunchData("", SystemStatusInfo.StatusInfo.getDefaultInstance().toBuilder().setSysState(SYS_RUNNING).build(), SsmStatusInf.getDefaultInstance().toBuilder().setModeState(ModeState.MODE_RUN_READY).setAutoPilotReady(false).setRemotePilotReady(false).build(), FSMStatusReasonRespond.getDefaultInstance()), ArrayList<UnableLaunchReason>().also {
|
||||
CallerAutopilotActionsListenerManager.invokeAutopilotAbility(false,
|
||||
LaunchConditionData(
|
||||
"",
|
||||
SystemStatusInfo.StatusInfo.getDefaultInstance().toBuilder()
|
||||
.setSysState(SYS_RUNNING).build(),
|
||||
SsmStatusInf.getDefaultInstance().toBuilder()
|
||||
.setModeState(ModeState.MODE_RUN_READY).setAutoPilotReady(false)
|
||||
.setRemotePilotReady(false).build(),
|
||||
FSMStatusReasonRespond.getDefaultInstance()
|
||||
), ArrayList<UnableLaunchReason>().also {
|
||||
it += UnableLaunchReason(CHASSIS, CHASSIS_BRAKE, "brake")
|
||||
})
|
||||
}
|
||||
|
||||
if (flag == 4) {
|
||||
CallerAutopilotActionsListenerManager.invokeAutopilotAbility(false, UnableLaunchData("", SystemStatusInfo.StatusInfo.getDefaultInstance().toBuilder().setSysState(SYS_RUNNING).build(), SsmStatusInf.getDefaultInstance().toBuilder().setModeState(ModeState.MODE_RUN_READY).setAutoPilotReady(false).setRemotePilotReady(false).build(), FSMStatusReasonRespond.getDefaultInstance()), ArrayList<UnableLaunchReason>().also {
|
||||
CallerAutopilotActionsListenerManager.invokeAutopilotAbility(false,
|
||||
LaunchConditionData(
|
||||
"",
|
||||
SystemStatusInfo.StatusInfo.getDefaultInstance().toBuilder()
|
||||
.setSysState(SYS_RUNNING).build(),
|
||||
SsmStatusInf.getDefaultInstance().toBuilder()
|
||||
.setModeState(ModeState.MODE_RUN_READY).setAutoPilotReady(false)
|
||||
.setRemotePilotReady(false).build(),
|
||||
FSMStatusReasonRespond.getDefaultInstance()
|
||||
), ArrayList<UnableLaunchReason>().also {
|
||||
it += UnableLaunchReason(CHASSIS, CHASSIS_HAZARD_LIGHTS, "lights")
|
||||
})
|
||||
}
|
||||
|
||||
if (flag == 5) {
|
||||
CallerAutopilotActionsListenerManager.invokeAutopilotAbility(false, UnableLaunchData("", SystemStatusInfo.StatusInfo.getDefaultInstance().toBuilder().setSysState(SYS_RUNNING).build(), SsmStatusInf.getDefaultInstance().toBuilder().setModeState(ModeState.MODE_RUN_READY).setAutoPilotReady(false).setRemotePilotReady(false).build(), FSMStatusReasonRespond.getDefaultInstance()), ArrayList<UnableLaunchReason>().also {
|
||||
CallerAutopilotActionsListenerManager.invokeAutopilotAbility(false,
|
||||
LaunchConditionData(
|
||||
"",
|
||||
SystemStatusInfo.StatusInfo.getDefaultInstance().toBuilder()
|
||||
.setSysState(SYS_RUNNING).build(),
|
||||
SsmStatusInf.getDefaultInstance().toBuilder()
|
||||
.setModeState(ModeState.MODE_RUN_READY).setAutoPilotReady(false)
|
||||
.setRemotePilotReady(false).build(),
|
||||
FSMStatusReasonRespond.getDefaultInstance()
|
||||
), ArrayList<UnableLaunchReason>().also {
|
||||
it += UnableLaunchReason(CHASSIS, CHASSIS_THROTTLE, "throttle")
|
||||
})
|
||||
}
|
||||
|
||||
if (flag == 6) {
|
||||
CallerAutopilotActionsListenerManager.invokeAutopilotAbility(false, UnableLaunchData("", SystemStatusInfo.StatusInfo.getDefaultInstance().toBuilder().setSysState(SYS_RUNNING).build(), SsmStatusInf.getDefaultInstance().toBuilder().setModeState(ModeState.MODE_RUN_READY).setAutoPilotReady(false).setRemotePilotReady(false).build(), FSMStatusReasonRespond.getDefaultInstance()), ArrayList<UnableLaunchReason>().also {
|
||||
CallerAutopilotActionsListenerManager.invokeAutopilotAbility(false,
|
||||
LaunchConditionData(
|
||||
"",
|
||||
SystemStatusInfo.StatusInfo.getDefaultInstance().toBuilder()
|
||||
.setSysState(SYS_RUNNING).build(),
|
||||
SsmStatusInf.getDefaultInstance().toBuilder()
|
||||
.setModeState(ModeState.MODE_RUN_READY).setAutoPilotReady(false)
|
||||
.setRemotePilotReady(false).build(),
|
||||
FSMStatusReasonRespond.getDefaultInstance()
|
||||
), ArrayList<UnableLaunchReason>().also {
|
||||
it += UnableLaunchReason(CHASSIS, CHASSIS_GEAR, "gear")
|
||||
it += UnableLaunchReason(CHASSIS, CHASSIS_STEERING, "steering")
|
||||
it += UnableLaunchReason(CHASSIS, CHASSIS_HAZARD_LIGHTS, "lights")
|
||||
|
||||
Reference in New Issue
Block a user