From 9595fe9f6f4441ee880bc564686aee8f9e3d2576 Mon Sep 17 00:00:00 2001 From: joylink_zhangsai <1021828630@qq.com> Date: Wed, 17 Jan 2024 17:15:35 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A4=84=E7=90=86=E5=BA=94=E7=AD=94=E5=99=A8?= =?UTF-8?q?=E6=8A=A5=E6=96=87=E6=95=B0=E6=8D=AE=E7=B1=BB=E5=9E=8B=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- rtss_simulation | 2 +- ts/simulation/wayside/memory/wayside_simulation.go | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/rtss_simulation b/rtss_simulation index 79484be..0203bbc 160000 --- a/rtss_simulation +++ b/rtss_simulation @@ -1 +1 @@ -Subproject commit 79484bea97a47b76e8f0f0deb42d64286ddf0af7 +Subproject commit 0203bbcefa0797f2efae50bbaa5e9c6d0f30a84e diff --git a/ts/simulation/wayside/memory/wayside_simulation.go b/ts/simulation/wayside/memory/wayside_simulation.go index 13a593c..4efc6ca 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/hex" "encoding/json" "fmt" "log/slog" @@ -1031,10 +1032,14 @@ func fillProtoRepository(repo *proto.Repository, storage *data_proto.RtssGraphic } stm := make(map[string][]string) for _, data := range storage.Transponders { + fixedTelegram, err := hex.DecodeString(data.FixedTelegram) + if err != nil { + slog.Error(fmt.Sprintf("解析应答器[%s]的报文出错:", err.Error())) + } responder := &proto.Transponder{ Id: uidsMap.TransponderIds[GetMapElementId(data.Common)].Uid, Km: convertKm(data.KilometerSystem), - FixedTelegram: data.FixedTelegram, + FixedTelegram: fixedTelegram, Type: convertToProtoBaliseType(data.Type), } switch data.TransponderRef.DeviceType {