修改采集信息panic
This commit is contained in:
parent
1237abc9e9
commit
88e9482326
|
@ -240,7 +240,9 @@ func handlerSignalState(w ecs.World, uid string) (*state_proto.SignalState, erro
|
|||
signalState.Aspect = state_proto.Signal_A
|
||||
}
|
||||
}
|
||||
signalState.Param = appcomponent.SignalParamType.Get(entry)
|
||||
if entry.HasComponent(appcomponent.SignalParamType) {
|
||||
signalState.Param = appcomponent.SignalParamType.Get(entry)
|
||||
}
|
||||
if entry.HasComponent(component.Signal2XH1ElectronicType) { // 2XH1信号机
|
||||
signal2XH1 := component.Signal2XH1ElectronicType.Get(entry)
|
||||
signalState.RelayStateMap = make(map[string]bool, 3)
|
||||
|
@ -387,7 +389,9 @@ func collectTurnoutStates(sim *memory.VerifySimulation, mapId int32) ([]*state_p
|
|||
Dw: pos.Dw,
|
||||
Fw: pos.Fw,
|
||||
}
|
||||
s.Param = appcomponent.PointsParamType.Get(entry)
|
||||
if entry.HasComponent(appcomponent.PointsParamType) {
|
||||
s.Param = appcomponent.PointsParamType.Get(entry)
|
||||
}
|
||||
// // 强制(联锁驱动无效)
|
||||
// s.Force = entry.HasComponent(component.TurnoutFaultCiqdType)
|
||||
// // 失表
|
||||
|
|
Loading…
Reference in New Issue