添加信号机型号
修改信号机是否开放信号判断逻辑
This commit is contained in:
parent
3410967ce6
commit
1eb4bebb7a
@ -10,40 +10,39 @@ public enum SignalModel {
|
||||
/**
|
||||
* 红绿黄三灯信号机
|
||||
*/
|
||||
RGY(SignalAspect.R, Arrays.asList(SignalAspect.G, SignalAspect.Y), SignalAspect.RY),
|
||||
RGY(SignalAspect.R, SignalAspect.RY),
|
||||
/**
|
||||
* 单红灯信号机
|
||||
*/
|
||||
R(SignalAspect.R, null, null),
|
||||
R(SignalAspect.R, null),
|
||||
/**
|
||||
* 蓝白调车信号机
|
||||
*/
|
||||
BW(SignalAspect.B, Arrays.asList(SignalAspect.W), null),
|
||||
BW(SignalAspect.B, null),
|
||||
/**
|
||||
* 黄红白(列车兼调车信号机)
|
||||
*/
|
||||
YRW(SignalAspect.R, null),
|
||||
/**
|
||||
* 黄绿红黄白(大铁进站信号机)
|
||||
*/
|
||||
YGRYW(SignalAspect.R, Arrays.asList(SignalAspect.G, SignalAspect.Y), SignalAspect.RW),
|
||||
YGRYW(SignalAspect.R, SignalAspect.RW),
|
||||
/**
|
||||
* 黄绿红绿白(出站兼调车信号机)
|
||||
*/
|
||||
YGRGW(SignalAspect.R, Arrays.asList(SignalAspect.G, SignalAspect.Y), SignalAspect.RW),
|
||||
YGRGW(SignalAspect.R, SignalAspect.RW),
|
||||
;
|
||||
/**
|
||||
* 信号机开启后默认显示(即禁止信号)
|
||||
*/
|
||||
private SignalAspect defaultAspect;
|
||||
/**
|
||||
* 主信号显示
|
||||
*/
|
||||
private List<SignalAspect> mainAspects;
|
||||
/**
|
||||
* 信号机引导信号显示
|
||||
*/
|
||||
private SignalAspect guideAspect;
|
||||
|
||||
SignalModel(SignalAspect defaultAspect, List<SignalAspect> mainAspects, SignalAspect guideAspect) {
|
||||
SignalModel(SignalAspect defaultAspect, SignalAspect guideAspect) {
|
||||
this.defaultAspect = defaultAspect;
|
||||
this.mainAspects = mainAspects;
|
||||
this.guideAspect = guideAspect;
|
||||
}
|
||||
|
||||
|
@ -310,7 +310,10 @@ public class Signal extends DelayUnlockDevice {
|
||||
}
|
||||
|
||||
public boolean isMainAspect() {
|
||||
return this.signalModel.getMainAspects() != null && this.signalModel.getMainAspects().contains(this.aspect);
|
||||
if (this.lockedRoute != null) {
|
||||
return this.aspect.equals(this.lockedRoute.getAspect());
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean isCtcApproachSection(String sectionCode) {
|
||||
|
Loading…
Reference in New Issue
Block a user