From b0b88cfefbed2944689590c65758247c955d1060 Mon Sep 17 00:00:00 2001 From: Florian Amsallem Date: Thu, 18 Apr 2024 10:55:47 +0200 Subject: [PATCH] editoast: fix ts2 request payload for core --- editoast/src/core/v2/simulation.rs | 4 ++-- editoast/src/views/v2/train_schedule.rs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/editoast/src/core/v2/simulation.rs b/editoast/src/core/v2/simulation.rs index 6565f5fc5cb..af5bdf54488 100644 --- a/editoast/src/core/v2/simulation.rs +++ b/editoast/src/core/v2/simulation.rs @@ -84,9 +84,9 @@ impl From for PhysicRollingStock { pub struct SimulationScheduleItem { /// Position on the path in mm pub path_offset: u64, - /// Time in s since the departure of the train + /// Time in ms since the departure of the train pub arrival: Option, - /// Duration of the stop in s + /// Duration of the stop in ms pub stop_for: Option, } diff --git a/editoast/src/views/v2/train_schedule.rs b/editoast/src/views/v2/train_schedule.rs index c4ab4cd5edd..7d633c0e97b 100644 --- a/editoast/src/views/v2/train_schedule.rs +++ b/editoast/src/views/v2/train_schedule.rs @@ -557,11 +557,11 @@ async fn build_simulation_request( arrival: schedule_item .arrival .as_ref() - .map(|t| t.num_seconds() as u64), + .map(|t| t.num_milliseconds() as u64), stop_for: schedule_item .stop_for .as_ref() - .map(|t| t.num_seconds() as u64), + .map(|t| t.num_milliseconds() as u64), }) .collect();