From f90563f82152e773068c7d34c0b53e8bd60e0ca3 Mon Sep 17 00:00:00 2001 From: joylink_zhangsai <1021828630@qq.com> Date: Thu, 18 Jan 2024 11:20:11 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=B1=8F=E8=94=BD=E9=97=A8MG?= =?UTF-8?q?J=E9=97=AA=E7=83=81=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sys/circuit_sys/psd.go | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/sys/circuit_sys/psd.go b/sys/circuit_sys/psd.go index 03cab0f..c9abeae 100644 --- a/sys/circuit_sys/psd.go +++ b/sys/circuit_sys/psd.go @@ -31,16 +31,16 @@ func (p *PsdSys) Update(world ecs.World) { psdCircuit := component.PsdCircuitType.Get(entry) //屏蔽门驱动 if psdCircuit.GMJ != nil { - p.exciteGMJ(worldData, psdCircuit) + p.driveGMJ(worldData, psdCircuit) psc.InterlockGM = component.BitStateType.Get(psdCircuit.GMJ).Val } for group, kmj := range psdCircuit.KMJMap { - p.exciteKMJ(worldData, psdCircuit, kmj) + p.driveKMJ(worldData, psdCircuit, kmj) psc.InterlockKmGroup[group] = component.BitStateType.Get(kmj).Val } if psdCircuit.MGJ != nil { - p.exciteMGJ(psdCircuit, asdList) + p.driveMGJ(psdCircuit, asdList) psdState.Close = component.BitStateType.Get(psdCircuit.MGJ).Val } if psdCircuit.MPLJ != nil { @@ -136,7 +136,7 @@ func (p *PsdSys) gm(asdList *component.AsdList) { } } -func (p *PsdSys) exciteGMJ(data *component.WorldData, circuit *component.PsdCircuit) { +func (p *PsdSys) driveGMJ(data *component.WorldData, circuit *component.PsdCircuit) { bit, err := data.QueryQdBit(component.UidType.Get(circuit.GMJ).Id) if err != nil { return @@ -155,7 +155,7 @@ func (p *PsdSys) exciteGMJ(data *component.WorldData, circuit *component.PsdCirc } } -func (p *PsdSys) exciteKMJ(data *component.WorldData, circuit *component.PsdCircuit, kmj *ecs.Entry) { +func (p *PsdSys) driveKMJ(data *component.WorldData, circuit *component.PsdCircuit, kmj *ecs.Entry) { bit, err := data.QueryQdBit(component.UidType.Get(kmj).Id) if err != nil { return @@ -178,8 +178,8 @@ func (p *PsdSys) exciteKMJ(data *component.WorldData, circuit *component.PsdCirc } } -func (p *PsdSys) exciteMGJ(psdCircuit *component.PsdCircuit, asdList *component.AsdList) { - component.BitStateType.Get(psdCircuit.MGJ).Val = p.isAllAsdMotorClosed(asdList) +func (p *PsdSys) driveMGJ(psdCircuit *component.PsdCircuit, asdList *component.AsdList) { + component.RelayDriveType.Get(psdCircuit.MGJ).Td = p.isAllAsdMotorClosed(asdList) } // 是否所有滑动门电机都是关闭状态(继电器表示)