From 40662afc184a93589c598db75e8c74e2ab08cfb3 Mon Sep 17 00:00:00 2001 From: weizhihong Date: Wed, 15 Nov 2023 09:54:16 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E6=8E=A8=E9=80=81=E5=8D=8A=E5=AE=9E?= =?UTF-8?q?=E7=89=A9=E4=BF=A1=E6=81=AF=E6=97=B6=E5=A2=9E=E5=8A=A0=E5=88=97?= =?UTF-8?q?=E8=BD=A6=E8=BD=AE=E5=BE=84=E4=BF=A1=E6=81=AF=E3=80=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ts/simulation/wayside/memory/wayside_simulation.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ts/simulation/wayside/memory/wayside_simulation.go b/ts/simulation/wayside/memory/wayside_simulation.go index 27af094..9726ebb 100644 --- a/ts/simulation/wayside/memory/wayside_simulation.go +++ b/ts/simulation/wayside/memory/wayside_simulation.go @@ -1,6 +1,7 @@ package memory import ( + "encoding/binary" "encoding/json" "fmt" "log/slog" @@ -380,6 +381,7 @@ func (s *VerifySimulation) HandleSemiPhysicalTrainControlMsg(b []byte) { panic(dto.ErrorDto{Code: dto.ArgumentParseError, Message: err.Error()}) } d := append(b, uint8(trainId)) + d = binary.BigEndian.AppendUint16(d, uint16(train.WheelDiameter)) // 发送给动力学 dynamics.Default().SendTrainControlMessage(d) // 存放至列车中