From 6d5457f70690d73c57e66ba471e4e472680ce0fc Mon Sep 17 00:00:00 2001 From: thesai <1021828630@qq.com> Date: Wed, 27 Mar 2024 17:11:04 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90bug=E3=80=91=E8=BD=A6=E5=BA=93?= =?UTF-8?q?=E9=97=A8ecs=E7=B3=BB=E7=BB=9F=E9=80=BB=E8=BE=91=E6=B2=A1?= =?UTF-8?q?=E6=9C=89=E5=AF=B9MMSJ=E5=81=9A=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sys/circuit_sys/ckm.go | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/sys/circuit_sys/ckm.go b/sys/circuit_sys/ckm.go index 184c56e..e277427 100644 --- a/sys/circuit_sys/ckm.go +++ b/sys/circuit_sys/ckm.go @@ -27,13 +27,12 @@ func (p *CkmSys) Update(world ecs.World) { return } posCom := component.FixedPositionTransformType.Get(entry) - local := false //是否本地模式 circuit := component.CkmCircuitType.Get(entry) //目前不考虑没有车库门电路的情况 //车库门PSL if entry.HasComponent(component.CkmPslType) { ckmPsl := component.CkmPslType.Get(entry) - component.RelayDriveType.Get(circuit.MPLJ).Td = component.BitStateType.Get(ckmPsl.MPLA).Val - local = component.BitStateType.Get(ckmPsl.MMSA).Val + component.RelayDriveType.Get(circuit.MPLJ).Td = component.BitStateType.Get(ckmPsl.MPLA).Val //门旁路 + component.RelayDriveType.Get(circuit.MMSJ).Td = component.BitStateType.Get(ckmPsl.MMSA).Val //门模式 } //门开/关继电器及状态 if posCom.Pos == consts.TwoPosMin { @@ -46,7 +45,7 @@ func (p *CkmSys) Update(world ecs.World) { //门故障继电器及状态 component.RelayDriveType.Get(circuit.MGZJ).Td = entry.HasComponent(component.CkmStateLossTag) //开/关门继电器驱动状态 - if local { + if component.BitStateType.Get(circuit.MMSJ).Val { ckmPsl := component.CkmPslType.Get(entry) component.RelayDriveType.Get(circuit.KMJ).Td = component.BitStateType.Get(ckmPsl.KMA).Val component.RelayDriveType.Get(circuit.GMJ).Td = component.BitStateType.Get(ckmPsl.GMA).Val