修改侧防锁闭条件

This commit is contained in:
walker-sheng 2021-01-29 09:53:04 +08:00
parent 1f3d9a6f3a
commit fb343bba80
2 changed files with 6 additions and 2 deletions

View File

@ -64,11 +64,11 @@ public class RouteFls {
public void lock() {
for (FlsElement flsElement : this.getLevel1List()) {
SwitchElement pSwitch = flsElement.getPSwitch();
if (pSwitch != null && !pSwitch.getASwitch().isSectionOccupied()) {
if (pSwitch != null && (pSwitch.isOnPosition() || !pSwitch.getASwitch().isSectionOccupied())) {
pSwitch.getASwitch().fpLock();
} else {
SwitchElement fpae = flsElement.getFpae();
if (fpae != null && !fpae.getASwitch().isSectionOccupied()) {
if (fpae != null && (fpae.isOnPosition() || !fpae.getASwitch().isSectionOccupied())) {
fpae.getASwitch().fpLock();
}
}

View File

@ -34,4 +34,8 @@ public class SwitchElement {
}
return true;
}
public boolean isOnPosition() {
return this.aSwitch.isOnPosition(this.isNormal());
}
}