修改小bug

This commit is contained in:
thesai 2021-09-14 17:00:21 +08:00
parent 5753f54874
commit c2a00f26e9
4 changed files with 15 additions and 2 deletions

View File

@ -431,7 +431,7 @@ public class MaService {
}
}
} else if(front) {
if (!section.isRouteLock() && !section.isOverlapLock()) {//列车前方区段未锁闭
if (!section.isRouteLock() && !section.isOverlapLock() && !section.isLogicOverlapLock()) {//列车前方区段未锁闭
Signal aheadSignal = section.getSignalOf(right);
if (aheadSignal == null || aheadSignal.getLockedRoute() == null ||
!aheadSignal.getLockedRoute().isOpen()) {

View File

@ -72,7 +72,7 @@ public class StandService {
if (vrPsd.isPslControl()) {
return;
}
vrPsdService.controlVrPSD(simulation, vrPsd, true, VrPsdService.CommandSource.SIG);
vrPsdService.controlVrPSD(simulation, vrPsd, false, VrPsdService.CommandSource.SIG);
}
/**

View File

@ -1148,6 +1148,17 @@ public class Section extends MayOutOfOrderDevice {
return !this.isNormalStandTrack() && this.isTurnBackTrack();
}
public boolean isLogicOverlapLock() {
if (!CollectionUtils.isEmpty(this.logicList)) {
for (Section section : this.logicList) {
if (section.isOverlapLock()) {
return true;
}
}
}
return false;
}
public enum SectionRoadType {
/**
* 左行线

View File

@ -234,6 +234,8 @@ public class ATPLogicLoop {
private void driveModeControl(Simulation simulation, VirtualRealityTrain train) {
DriveMode preDriveMode = train.getPreDriveMode();
if (preDriveMode == null)
return;
DriveMode driveMode = train.getDriveMode();
SectionPosition headPosition = train.getHeadPosition();
SectionPosition tailPosition = train.getTailPosition();