门选零位不给牵引力

This commit is contained in:
Jade 2021-12-02 10:08:06 +08:00
parent a7acb9929d
commit be7e4f7a83

View File

@ -34,6 +34,10 @@ public class DriverOperateHandler {
VirtualRealityTrain train = simulation.getRepository().getOnlineTrainBy(groupNumber);
// if (train.isSignalEB() && percent == -2)
// ATPService.cancelSignalEB(train);
// 门选不是零位不给牵引力
if (!train.getDoorSelection().equals(VirtualRealityTrain.DoorSelection.Z)) {
return;
}
if ((percent <= 1 && percent >= -1) || percent == -2) {
train.setLeverPosition(percent);
}