From 2c486618d7e6e6869159984a15c7a8b27b4b3048 Mon Sep 17 00:00:00 2001 From: weizhihong Date: Mon, 20 Nov 2023 16:09:28 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E3=80=90=E4=BF=AE=E6=94=B9emp\spk=E8=AE=BE?= =?UTF-8?q?=E5=A4=87code=E5=8C=B9=E9=85=8D=E3=80=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- entity/ibp.go | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/entity/ibp.go b/entity/ibp.go index 0081a57..1e578f7 100644 --- a/entity/ibp.go +++ b/entity/ibp.go @@ -82,11 +82,11 @@ func LoadSPKEntity(w ecs.World, entry *ecs.Entry, spkData *repository.IBPRefMap, for _, btn := range spkData.Buttons() { e := NewButtonEntity(w, btn, entityMap) switch btn.Code() { - case "X旁路": + case "SPKSXPLA": spk.SPKSXPLA_BTN = e - case "S旁路": + case "SPKSSPLA": spk.SPKSSPLA_BTN = e - case "人员防护试灯": + case "SDA": spk.SDA = e } } @@ -126,13 +126,13 @@ func LoadSPKEntity(w ecs.World, entry *ecs.Entry, spkData *repository.IBPRefMap, for _, light := range spkData.Lights() { e := NewIBPLightEntity(w, light.Id(), entityMap) switch light.Code() { - case "启用状态_SPKS1": + case "SPKSX1D": spk.SPKSX1D = e - case "启用状态_SPKS3": + case "SPKSX3D": spk.SPKSX3D = e - case "启用状态_SPKS2": + case "SPKSS2D": spk.SPKSS2D = e - case "启用状态_SPKS4": + case "SPKSS4D": spk.SPKSS4D = e } } @@ -162,17 +162,17 @@ func LoadEMPEntity(w ecs.World, entry *ecs.Entry, spkData *repository.IBPRefMap, emp.EMP4_BTN = e case "EMP6": emp.EMP6_BTN = e - case "X紧急关闭": + case "XEMPJ": emp.EMPX_BTN = e - case "S紧急关闭": + case "SEMPJ": emp.EMPS_BTN = e - case "X紧急关闭复原": + case "XEMPFA": emp.XEMPFA_BTN = e - case "S紧急关闭复原": + case "SEMPFA": emp.SEMPFA_BTN = e - case "切断警铃": + case "QBA": emp.QBA = e - case "信号试灯": + case "SDA": emp.SDA = e } } @@ -190,16 +190,16 @@ func LoadEMPEntity(w ecs.World, entry *ecs.Entry, spkData *repository.IBPRefMap, for _, light := range spkData.Lights() { e := NewIBPLightEntity(w, light.Id(), entityMap) switch light.Code() { - case "X紧急关闭": + case "XEMPD": emp.XEMPD = e - case "S紧急关闭": + case "SEMPD": emp.SEMPD = e } } // 蜂鸣器 for _, alarm := range spkData.Alarms() { switch alarm.Code() { - case "报警电铃": + case "蜂鸣器": emp.Alarm = NewAlarmEntity(w, alarm, entityMap) } } From 7c455d0bf52bc90f38f472622fddd4bf2e1c281a Mon Sep 17 00:00:00 2001 From: weizhihong Date: Tue, 21 Nov 2023 10:25:37 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E3=80=90ibp=E7=9B=98=E5=85=83=E7=B4=A0?= =?UTF-8?q?=E5=8C=B9=E9=85=8D=E9=80=BB=E8=BE=91=E4=BF=AE=E6=94=B9=E3=80=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- entity/ibp.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/entity/ibp.go b/entity/ibp.go index 1e578f7..ece73f5 100644 --- a/entity/ibp.go +++ b/entity/ibp.go @@ -94,13 +94,13 @@ func LoadSPKEntity(w ecs.World, entry *ecs.Entry, spkData *repository.IBPRefMap, for _, key := range spkData.Keys() { e := NewIBPKeyEntity(w, key.Id(), entityMap) switch key.Code() { - case "SPKS1": + case "SPKSX1J": spk.SPKSX1J_KEY = e - case "SPKS3": + case "SPKSX3J": spk.SPKSX3J_KEY = e - case "SPKS2": + case "SPKSS2J": spk.SPKSS2J_KEY = e - case "SPKS4": + case "SPKSS4J": spk.SPKSS4J_KEY = e } } @@ -162,9 +162,9 @@ func LoadEMPEntity(w ecs.World, entry *ecs.Entry, spkData *repository.IBPRefMap, emp.EMP4_BTN = e case "EMP6": emp.EMP6_BTN = e - case "XEMPJ": + case "EMP-X": emp.EMPX_BTN = e - case "SEMPJ": + case "EMP-S": emp.EMPS_BTN = e case "XEMPFA": emp.XEMPFA_BTN = e