This commit is contained in:
parent
0a73d0b899
commit
3fcb286e05
|
@ -144,12 +144,11 @@ func handlerSectionState(w ecs.World, uid string) *state.SectionState {
|
|||
//fmt.Printf("id=%s的信号机不存在", uid)
|
||||
return nil
|
||||
}
|
||||
if entry.HasComponent(component.AxleSectionType) { //计轴区段
|
||||
if entry.HasComponent(component.PhysicalSectionStateType) { //计轴区段
|
||||
sectionState := &state.SectionState{}
|
||||
axleState := component.AxleSectionType.Get(entry)
|
||||
sectionFault := component.AxleSectionFaultType.Get(entry)
|
||||
axleState := component.PhysicalSectionStateType.Get(entry)
|
||||
sectionState.Occupied = axleState.Occ
|
||||
sectionState.AxleFault = sectionFault.SectionFault
|
||||
sectionState.AxleFault = entry.HasComponent(component.AxleSectionFaultTag)
|
||||
return sectionState
|
||||
}
|
||||
return nil
|
||||
|
|
Loading…
Reference in New Issue