From 781c328e49fe06282e755f8c47131482ff28bdb1 Mon Sep 17 00:00:00 2001 From: weizhihong Date: Sun, 8 Oct 2023 10:35:40 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E7=BB=A7=E7=94=B5=E5=99=A8=E6=93=8D?= =?UTF-8?q?=E4=BD=9C=E6=8E=A5=E5=8F=A3=E3=80=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../wayside/memory/wayside_memory_relay.go | 15 +++++---------- rtss_simulation | 2 +- 2 files changed, 6 insertions(+), 11 deletions(-) diff --git a/ats/verify/simulation/wayside/memory/wayside_memory_relay.go b/ats/verify/simulation/wayside/memory/wayside_memory_relay.go index e6790df..d43b8e1 100644 --- a/ats/verify/simulation/wayside/memory/wayside_memory_relay.go +++ b/ats/verify/simulation/wayside/memory/wayside_memory_relay.go @@ -1,25 +1,20 @@ package memory import ( - "fmt" - "joylink.club/bj-rtsts-server/ats/verify/protos/graphicData" "joylink.club/bj-rtsts-server/ats/verify/protos/state" - "joylink.club/bj-rtsts-server/dto" "joylink.club/rtsssimulation/component" "joylink.club/rtsssimulation/entity" + "joylink.club/rtsssimulation/fi" ) // 继电器操作方法 func ChangeRelayState(sim *VerifySimulation, mapId int32, id string, td bool) { uid := QueryUidByMidAndComId(mapId, id, &graphicData.Relay{}) - entry, ok := entity.GetEntityByUid(sim.World, uid) - if !ok { - panic(&dto.ErrorDto{Code: dto.DataNotExist, Message: fmt.Sprintf("不存在【comId:%s】实体", uid)}) - } - if entry.HasComponent(component.RelayDriveType) { - relayDrive := component.RelayDriveType.Get(entry) - relayDrive.Td = td + if td { + fi.DriveRelayUp(sim.World, uid) + } else { + fi.DriveRelayDown(sim.World, uid) } } diff --git a/rtss_simulation b/rtss_simulation index 665adde..3a6da10 160000 --- a/rtss_simulation +++ b/rtss_simulation @@ -1 +1 @@ -Subproject commit 665adde46e266c800217bbf2033168698dafa284 +Subproject commit 3a6da100d4074c26093842f7604f68f05853822d