Improved display printing, added extra debug.

This commit is contained in:
2026-05-22 05:06:46 +01:00
parent c13411065a
commit e185b38222
3 changed files with 38 additions and 15 deletions
+2 -1
View File
@@ -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);
}
}