From 85d5781122ce5d24970dc66d9f94c66cb9dfa004 Mon Sep 17 00:00:00 2001 From: thesai <1021828630@qq.com> Date: Fri, 9 Aug 2024 11:38:53 +0800 Subject: [PATCH] =?UTF-8?q?[bug]=E7=8E=B0=E5=9C=A8ESB=E5=B7=B2=E7=BB=8F?= =?UTF-8?q?=E4=B8=8D=E6=98=AF=E6=8C=89=E9=92=AE=E4=BA=86=EF=BC=8C=E5=8E=BB?= =?UTF-8?q?=E6=8E=89=E7=8A=B6=E6=80=81=E9=87=87=E9=9B=86=EF=BC=9B=E6=9E=84?= =?UTF-8?q?=E5=BB=BArepo=E6=97=B6=E6=B2=A1=E6=9C=89=E5=AF=B9=E7=AB=99?= =?UTF-8?q?=E5=8F=B0=E6=96=B9=E5=90=91=E8=B5=8B=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- message_server/sfp_ms.go | 16 ++++++++-------- .../wayside/memory/wayside_simulation.go | 10 +++++++++- 2 files changed, 17 insertions(+), 9 deletions(-) diff --git a/message_server/sfp_ms.go b/message_server/sfp_ms.go index baaef0a..204493e 100644 --- a/message_server/sfp_ms.go +++ b/message_server/sfp_ms.go @@ -35,10 +35,10 @@ func NewSfpMs(vs *memory.VerifySimulation, mapId int32) ms_api.MsgTask { if err != nil { return err } - buttonStates, err := collectStationButtonStates(vs.World, mapId) - if err != nil { - return err - } + //buttonStates, err := collectStationButtonStates(vs.World, mapId) + //if err != nil { + // return err + //} psdStates, err := collectPsdStates(vs.World, mapId) if err != nil { return err @@ -74,10 +74,10 @@ func NewSfpMs(vs *memory.VerifySimulation, mapId int32) ms_api.MsgTask { ststes := &state_proto.PushedDevicesStatus{ All: true, AllStatus: &state_proto.AllDevicesStatus{ - TrainState: trainState, - SwitchState: turnoutStates, - SignalState: signalStates, - ButtonState: buttonStates, + TrainState: trainState, + SwitchState: turnoutStates, + SignalState: signalStates, + //ButtonState: buttonStates, PsdState: psdStates, SectionState: sectionStates, PlatformState: platformStates, diff --git a/ts/simulation/wayside/memory/wayside_simulation.go b/ts/simulation/wayside/memory/wayside_simulation.go index e309ec2..6e061eb 100644 --- a/ts/simulation/wayside/memory/wayside_simulation.go +++ b/ts/simulation/wayside/memory/wayside_simulation.go @@ -1318,6 +1318,14 @@ func fillProtoRepository(repo *proto.Repository, storage *data_proto.RtssGraphic Id: uidsMap.PlatformIds[platformId].Uid, Code: data.Code, } + switch data.Type { + case data_proto.Platform_up: + platform.Direction = proto.Platform_Up + case data_proto.Platform_down: + platform.Direction = proto.Platform_Down + case data_proto.Platform_Unknown: + platform.Direction = proto.Platform_Unknown + } repo.Platforms = append(repo.Platforms, platform) platform.StationId = uidsMap.StationIds[data.RefStationId].Uid platform.PhysicalSectionId = uidsMap.PhysicalSectionIds[data.RefSectionId].Uid @@ -1417,7 +1425,7 @@ func fillProtoRepository(repo *proto.Repository, storage *data_proto.RtssGraphic repo.Spkss = append(repo.Spkss, &proto.Spks{ Id: uidsMap.SpksIds[data.Common.Id].Uid, Code: data.Code, - PlatformId: uidsMap.StationIds[data.RefStand].Uid, + PlatformId: uidsMap.PlatformIds[data.RefStand].Uid, }) } }