计轴rssp 集成

This commit is contained in:
xzb 2023-11-09 15:55:40 +08:00
parent 8cb019147f
commit d0ad082218

View File

@ -32,7 +32,6 @@ func (s *FaDcAxleDeviceSystem) Update(w ecs.World) {
s.calculateDrst(sectionState, axleDevice, axleRuntime) s.calculateDrst(sectionState, axleDevice, axleRuntime)
s.calculatePdrst(sectionState, axleDevice, axleRuntime) s.calculatePdrst(sectionState, axleDevice, axleRuntime)
s.calculateSectionState(sectionState, axleDevice, axleRuntime) s.calculateSectionState(sectionState, axleDevice, axleRuntime)
s.calculateAxleCount(sectionState, axleDevice, axleRuntime)
if "北京_12_酒仙桥_12G" == axleSectionId && false { if "北京_12_酒仙桥_12G" == axleSectionId && false {
sectionFault := axleSectionEntry.HasComponent(component.AxleSectionFaultTag) sectionFault := axleSectionEntry.HasComponent(component.AxleSectionFaultTag)
@ -52,13 +51,6 @@ func (s *FaDcAxleDeviceSystem) Update(w ecs.World) {
}) })
} }
// 计算计轴区段内车轴数
// 目前通过查看有哪些车在该计轴区段内实现,定性
func (s *FaDcAxleDeviceSystem) calculateAxleCount(sectionState *component.PhysicalSectionState, axleDevice *component.AxlePhysicalSection, axleRuntime *component.AxleDeviceRuntime) {
//检查该区段内有没有车
// ...todo
}
// 计算计轴区段状态 // 计算计轴区段状态
func (s *FaDcAxleDeviceSystem) calculateSectionState(sectionState *component.PhysicalSectionState, axleDevice *component.AxlePhysicalSection, axleRuntime *component.AxleDeviceRuntime) { func (s *FaDcAxleDeviceSystem) calculateSectionState(sectionState *component.PhysicalSectionState, axleDevice *component.AxlePhysicalSection, axleRuntime *component.AxleDeviceRuntime) {
isIdle := axleDevice.Count <= 0 && !axleRuntime.DoingPdrst //区段空闲:区段内车轴数为零且没有预复位 isIdle := axleDevice.Count <= 0 && !axleRuntime.DoingPdrst //区段空闲:区段内车轴数为零且没有预复位