summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cgi/index.pl11
-rw-r--r--lib/App/VRR/Fakedisplay.pm.PL2
-rw-r--r--share/font.pngbin649 -> 649 bytes
3 files changed, 12 insertions, 1 deletions
diff --git a/cgi/index.pl b/cgi/index.pl
index e9fff98..04bbb7d 100644
--- a/cgi/index.pl
+++ b/cgi/index.pl
@@ -109,6 +109,10 @@ sub render_image {
my ( $results, $errstr ) = get_results_for( $city, $stop );
+ if ($errstr) {
+ $color = '255,0,0';
+ }
+
my $strp_simple = DateTime::Format::Strptime->new(
pattern => '%H:%M',
time_zone => 'floating',
@@ -139,6 +143,13 @@ sub render_image {
color => [ split( qr{,}, $color ) ]
);
+ if ($errstr) {
+ $png->draw_at(6, '-------efa.vrr.de error-------');
+ $png->new_line();
+ $png->new_line();
+ $png->draw_at(0, $errstr);
+ }
+
$self->res->headers->content_type('image/png');
for my $d ( @{$results} ) {
diff --git a/lib/App/VRR/Fakedisplay.pm.PL b/lib/App/VRR/Fakedisplay.pm.PL
index 1a9bf49..02b8bac 100644
--- a/lib/App/VRR/Fakedisplay.pm.PL
+++ b/lib/App/VRR/Fakedisplay.pm.PL
@@ -110,7 +110,7 @@ ___CUT___
parse_char_row( 0, 'A' .. 'Z' );
parse_char_row( 10, 'a' .. 'z' );
parse_char_row( 20, '0' .. '9' );
-parse_char_row( 30, q{:}, q{-}, q{.}, q{,}, q{/}, q{ } );
+parse_char_row( 30, q{:}, q{-}, q{.}, q{,}, q{/}, q{|}, q{ } );
parse_char_row( 40, qw(ä ö ü ß) );
print $out_fh <<'___CUT___';
diff --git a/share/font.png b/share/font.png
index fc88df8..7a0dd5e 100644
--- a/share/font.png
+++ b/share/font.png
Binary files differ