From d4f8d3416fb21b95666de96ce57210d51454e299 Mon Sep 17 00:00:00 2001 From: joylink_zhangsai <1021828630@qq.com> Date: Wed, 10 Jan 2024 14:17:15 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E4=BB=A3=E7=A0=81=E5=86=B2?= =?UTF-8?q?=E7=AA=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../wayside/memory/wayside_memory_transponder.go | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/ts/simulation/wayside/memory/wayside_memory_transponder.go b/ts/simulation/wayside/memory/wayside_memory_transponder.go index 9820861..2da13b4 100644 --- a/ts/simulation/wayside/memory/wayside_memory_transponder.go +++ b/ts/simulation/wayside/memory/wayside_memory_transponder.go @@ -94,7 +94,7 @@ func BalisePositionModify(simulation *VerifySimulation, req *dto.BaliseMoveReqDt } component.KmType.Set(entry, km) offset := number.Abs(km.Value - akm.Value) - component.LinkPositionType.Set(entry, &component_proto.LinkPosition{ + component.LinkPositionType.Set(entry, &component_data.LinkPosition{ LinkId: link.Id(), Offset: offset, }) @@ -110,7 +110,7 @@ func BalisePositionReset(simulation *VerifySimulation, req *dto.BaliseReqDto) er } entry, _ := entity.GetEntityByUid(simulation.World, uid) component.KmType.Set(entry, transponder.Km()) - component.LinkPositionType.SetValue(entry, component_proto.LinkPosition{ + component.LinkPositionType.SetValue(entry, component_data.LinkPosition{ LinkId: transponder.LinkPosition().Link().Id(), Offset: transponder.LinkPosition().Offset(), }) @@ -124,10 +124,7 @@ func BaliseTelegramModify(simulation *VerifySimulation, req *dto.BaliseModifyTel if !ok { return sys_error.New(fmt.Sprintf("没有[mapId:%d id:%d]的应答器", req.MapId, req.BaliseId)) } - component.LinkPositionType.SetValue(te, component_data.LinkPosition{ - LinkId: req.LinkId, - Offset: req.Offset, - }) + component.BaliseStateType.SetValue(entry, component.BaliseState{ValidTelegram: req.Telegram}) return nil }