添加哈盈达大铁项目;机器人驾驶不再重复切手动位

This commit is contained in:
joylink_zhangsai 2022-08-01 15:20:56 +08:00
parent 33c89b1792
commit 9a757c4a7f
2 changed files with 10 additions and 4 deletions

View File

@ -58,6 +58,8 @@ public enum Project {
TEACHING,
/** 长兴技术学院 */
RICHOR_CXJS,
/** 哈盈达-铁路 */
HYD_RAILWAY,
;
public static boolean isDefault(Project project) {

View File

@ -166,8 +166,10 @@ public class SimulationRobotService {
if (train.isStop()) {
train.getRobotDriveParam().setStop(false);
} else {
if (!train.isInTheGear(VirtualRealityTrain.Handwheel.MANUAL)) { //确保当前在手动档位
CommandBO.Step step = CommandBO.buildGearChangeStep(train.getGroupNumber(), VirtualRealityTrain.Handwheel.MANUAL);
atsOperationDispatcher.execute(simulation, driver, step.getOperationType().name(), step.getOperationParams());
}
doBreakMax(simulation, train);
}
} else if (train.isRobotNeedRun() && (train.isRMMode() || train.isNRMMode())) { //CM应当根据推荐速度驾驶待实现
@ -184,8 +186,10 @@ public class SimulationRobotService {
}
private void newRobotDrive(Simulation simulation, SimulationMember driver, VirtualRealityTrain train) {
if (!train.isInTheGear(VirtualRealityTrain.Handwheel.MANUAL)) { //确保当前在手动档位
CommandBO.Step step = CommandBO.buildGearChangeStep(train.getGroupNumber(), VirtualRealityTrain.Handwheel.MANUAL);
atsOperationDispatcher.execute(simulation, driver, step.getOperationType().name(), step.getOperationParams());
}
DriveParamVO robotDriveParam = train.getRobotDriveParam();
if (train.isEB()) {