Unverified Commit a3c628d1 authored by Birte Kristina Friesel's avatar Birte Kristina Friesel
Browse files

DBRIS: Add load/occupancy data

parent 33d63fe5
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -419,6 +419,14 @@ sub startup {
			my $first  = $load->{FIRST}  // 0;
			my $second = $load->{SECOND} // 0;

			# DBRIS
			if ( $first == 99 ) {
				$first = 4;
			}
			if ( $second == 99 ) {
				$second = 4;
			}

			my @symbols
			  = (
				qw(help_outline person_outline people priority_high not_interested)
+12 −5
Original line number Diff line number Diff line
@@ -209,7 +209,10 @@ sub add {
						rt_dep    => _epoch( $j_stop->rt_dep ),
						arr_delay => $j_stop->arr_delay,
						dep_delay => $j_stop->dep_delay,
						load      => undef,
						load      => {
							FIRST  => $j_stop->occupancy_first,
							SECOND => $j_stop->occupancy_second
						},
						lat => $j_stop->lat,
						lon => $j_stop->lon,
					}
@@ -905,6 +908,10 @@ sub update_arrival_dbris {
					rt_dep    => _epoch( $j_stop->rt_dep ),
					arr_delay => $j_stop->arr_delay,
					dep_delay => $j_stop->dep_delay,
					load      => {
						FIRST  => $j_stop->occupancy_first,
						SECOND => $j_stop->occupancy_second
					},
					lat => $j_stop->lat,
					lon => $j_stop->lon,
				}