Improved display printing, added extra debug.
This commit is contained in:
+2
-1
@@ -4,6 +4,7 @@ mod utils;
|
||||
pub mod structs;
|
||||
use chrono::{DateTime, Local, Timelike};
|
||||
use log::{debug};
|
||||
use sdl3::sys::pixels::SDL_ArrayOrder;
|
||||
use std::{
|
||||
collections::{HashMap, HashSet}, fs::File, io::Error
|
||||
};
|
||||
@@ -66,7 +67,6 @@ impl Gtfs {
|
||||
for (_id, stop_time) in self.stop_times.iter() {
|
||||
if trips.contains_key(&stop_time.trip_id) {
|
||||
let stop_timestamp = stop_time.departure_time.or(stop_time.arrival_time)?;
|
||||
debug!("Stop timestamp {} current timestamp {}", stop_timestamp, current_timestamp);
|
||||
let trip= &self.trips.get(&stop_time.trip_id).unwrap();
|
||||
if current_timestamp < stop_timestamp.into() {
|
||||
let arrival: Arrival = Arrival {
|
||||
@@ -76,6 +76,7 @@ impl Gtfs {
|
||||
trip: &trip,
|
||||
departure_time: stop_timestamp.into()
|
||||
};
|
||||
debug!("Arrival to {:#?} for trip ID {:#?}.", arrival.trip.trip_headsign.as_ref().unwrap(), arrival.trip.id);
|
||||
arrivals.push(arrival);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user