From 3da85ac74611f417a21748729601cf4171c1858d Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Wed, 8 Feb 2023 19:26:02 +0100 Subject: HAFAS details: show platform (and platform change) --- lib/DBInfoscreen/Controller/Stationboard.pm | 3 +++ lib/DBInfoscreen/Helper/HAFAS.pm | 26 ++++++++++++++------------ 2 files changed, 17 insertions(+), 12 deletions(-) (limited to 'lib') diff --git a/lib/DBInfoscreen/Controller/Stationboard.pm b/lib/DBInfoscreen/Controller/Stationboard.pm index 56bf2c7..8eac6b0 100644 --- a/lib/DBInfoscreen/Controller/Stationboard.pm +++ b/lib/DBInfoscreen/Controller/Stationboard.pm @@ -1196,6 +1196,9 @@ sub train_details { = $station_info->{dep_cancelled}; $res->{is_cancelled} = $res->{arrival_is_cancelled} || $res->{arrival_is_cancelled}; + $res->{platform} = $station_info->{platform}; + $res->{scheduled_platform} + = $station_info->{sched_platform}; } } diff --git a/lib/DBInfoscreen/Helper/HAFAS.pm b/lib/DBInfoscreen/Helper/HAFAS.pm index ec5c051..c870afc 100644 --- a/lib/DBInfoscreen/Helper/HAFAS.pm +++ b/lib/DBInfoscreen/Helper/HAFAS.pm @@ -232,18 +232,20 @@ sub get_route_timestamps_p { for my $stop ( $journey->route ) { my $name = $stop->{name}; $ret->{$name} = $ret->{ $stop->{eva} } = { - name => $stop->{name}, - eva => $stop->{eva}, - sched_arr => $stop->{sched_arr}, - sched_dep => $stop->{sched_dep}, - rt_arr => $stop->{rt_arr}, - rt_dep => $stop->{rt_dep}, - arr_delay => $stop->{arr_delay}, - dep_delay => $stop->{dep_delay}, - arr_cancelled => $stop->{arr_cancelled}, - dep_cancelled => $stop->{dep_cancelled}, - load => $stop->{load}, - isCancelled => ( + name => $stop->{name}, + eva => $stop->{eva}, + sched_arr => $stop->{sched_arr}, + sched_dep => $stop->{sched_dep}, + rt_arr => $stop->{rt_arr}, + rt_dep => $stop->{rt_dep}, + arr_delay => $stop->{arr_delay}, + dep_delay => $stop->{dep_delay}, + arr_cancelled => $stop->{arr_cancelled}, + dep_cancelled => $stop->{dep_cancelled}, + platform => $stop->{platform}, + sched_platform => $stop->{sched_platform}, + load => $stop->{load}, + isCancelled => ( ( $stop->{arr_cancelled} or not $stop->{sched_arr} ) and ( $stop->{dep_cancelled} or not $stop->{sched_dep} ) -- cgit v1.2.3