From 82454b4e01ff73a075d894cb6725e0a40a95ce62 Mon Sep 17 00:00:00 2001 From: weizhihong Date: Thu, 28 Sep 2023 09:59:49 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E4=BF=AE=E6=94=B9=E4=BB=A3=E7=A0=81?= =?UTF-8?q?=E3=80=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ats/verify/simulation/wayside/memory/wayside_memory_map.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ats/verify/simulation/wayside/memory/wayside_memory_map.go b/ats/verify/simulation/wayside/memory/wayside_memory_map.go index 11b95f6..6c8d4b5 100644 --- a/ats/verify/simulation/wayside/memory/wayside_memory_map.go +++ b/ats/verify/simulation/wayside/memory/wayside_memory_map.go @@ -113,7 +113,7 @@ func sectionMapToEcsLink(repo *repository.Repository, id string, offset int64, r abDirection = ak > bk } linkId, _ := strconv.Atoi(section.ALinkPosition().Link().Identity.Id()) - trainKilometer := concertTrainKilometer(section.AKilometer().Value, offset, up) + trainKilometer := concertTrainKilometer(ak, offset, up) if abDirection { return int32(linkId), ao + offset, up, abDirection, trainKilometer } else { @@ -243,7 +243,7 @@ func ecsLinkMapToSection(offset int64, up bool, link *repository.Link) ( var section *repository.PhysicalSection for _, s := range link.PhysicalSections() { ao, bo := s.ALinkPosition().Offset(), s.BLinkPosition().Offset() - if (ao <= offset && offset <= bo) || (bo <= offset && offset <= ao) { + if (ao <= offset && offset < bo) || (bo <= offset && offset < ao) { section = s break }