修改侧防锁闭条件
This commit is contained in:
parent
1f3d9a6f3a
commit
fb343bba80
@ -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();
|
||||
}
|
||||
}
|
||||
|
@ -34,4 +34,8 @@ public class SwitchElement {
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public boolean isOnPosition() {
|
||||
return this.aSwitch.isOnPosition(this.isNormal());
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user