0
0
Fork 0

spat: Process SPATEMs for all intersections in cache

Otherwise it can take a while until SPAT data is available after the intersection was "locked".
This commit is contained in:
Jannik Beyerstedt 2026-06-22 23:02:09 +02:00 committed by Jannik Beyerstedt
commit c1315f10aa

View file

@ -208,19 +208,8 @@ impl State {
#[cfg(feature = "spat")] #[cfg(feature = "spat")]
pub fn handle_spatem(&mut self, etsi: &tlc::SPATEM) { pub fn handle_spatem(&mut self, etsi: &tlc::SPATEM) {
// only update "our" intersection
if let GlosaState::Locked(data) = &self.glosa_state
&& etsi
.spat
.intersections
.0
.iter()
.find(|i| i.id.id.0 == data.intersection_id)
.is_some()
{
self.tlc_cache.handle_spatem(self.time, etsi); self.tlc_cache.handle_spatem(self.time, etsi);
} }
}
#[cfg(feature = "spat")] #[cfg(feature = "spat")]
pub fn run_glosa(&mut self) -> Vec<SignalGroupData> { pub fn run_glosa(&mut self) -> Vec<SignalGroupData> {