From 8313dcd6e19b229f176cd521bc9ae78e7622b50c Mon Sep 17 00:00:00 2001 From: walker Date: Thu, 18 Jan 2024 17:20:14 +0800 Subject: [PATCH] =?UTF-8?q?=E9=81=93=E5=B2=94=E4=BF=A1=E5=8F=B7=E6=9C=BA?= =?UTF-8?q?=E7=8A=B6=E6=80=81=E8=AE=BE=E7=BD=AE=E7=9A=84=E5=8F=82=E6=95=B0?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E9=BB=98=E8=AE=A4=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- message_server/sfp_ms.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/message_server/sfp_ms.go b/message_server/sfp_ms.go index 62a6368..ca7c86e 100644 --- a/message_server/sfp_ms.go +++ b/message_server/sfp_ms.go @@ -6,6 +6,7 @@ import ( "strings" "time" + "joylink.club/bj-rtsts-server/dto/request_proto" "joylink.club/bj-rtsts-server/dto/state_proto" "joylink.club/rtsssimulation/repository/model/proto" @@ -242,6 +243,8 @@ func handlerSignalState(w ecs.World, uid string) (*state_proto.SignalState, erro } if entry.HasComponent(appcomponent.SignalParamType) { signalState.Param = appcomponent.SignalParamType.Get(entry) + } else { + signalState.Param = &request_proto.SignalParam{} } if entry.HasComponent(component.Signal2XH1ElectronicType) { // 2XH1信号机 signal2XH1 := component.Signal2XH1ElectronicType.Get(entry) @@ -391,6 +394,8 @@ func collectTurnoutStates(sim *memory.VerifySimulation, mapId int32) ([]*state_p } if entry.HasComponent(appcomponent.PointsParamType) { s.Param = appcomponent.PointsParamType.Get(entry) + } else { + s.Param = &request_proto.PointsParam{} } // // 强制(联锁驱动无效) // s.Force = entry.HasComponent(component.TurnoutFaultCiqdType)