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 }