From 789d604c1a83a1063b4c0f86f1853b3753c7327d Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Sun, 10 Jan 2021 12:22:01 +0100 Subject: Adjust for train_type changes from DBWagenreihung --- lib/DBInfoscreen.pm | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/lib/DBInfoscreen.pm b/lib/DBInfoscreen.pm index a8086e9..3a429e7 100644 --- a/lib/DBInfoscreen.pm +++ b/lib/DBInfoscreen.pm @@ -182,7 +182,7 @@ sub startup { { $ret = $wagon_type; } - elsif ( $train_type =~ m{IC2 Twindexx} ) { + elsif ( $train_type =~ m{IC2.TWIN} ) { $ret = $wagon_type; } elsif ( not $uic ) { @@ -192,13 +192,10 @@ sub startup { $ret = substr( $uic, 4, 5 ); } - if ( $train_type =~ m{ICE . 4..[.]1} ) { - $ret .= '.1'; + if ( $train_type =~ m{[.]S(\d)$} ) { + $ret .= ".$1"; } - elsif ( $train_type =~ m{ICE . 4..[.]2} ) { - $ret .= '.2'; - } - elsif ( $train_type =~ m{Redesign} ) { + elsif ( $train_type =~ m{[.]R$} ) { $ret .= '.r'; } -- cgit v1.2.3