From 92b7e9e42914fa3f542e221d536087ef69611293 Mon Sep 17 00:00:00 2001 From: Sven Czarnian Date: Thu, 9 Dec 2021 11:34:19 +0100 Subject: [PATCH] use the new protocol --- aman/com/Euroscope.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/aman/com/Euroscope.py b/aman/com/Euroscope.py index a8b2059..f4aaa5a 100644 --- a/aman/com/Euroscope.py +++ b/aman/com/Euroscope.py @@ -28,16 +28,14 @@ class ComThread(Thread): report.ParseFromString(msg) # try to associate the received aircrafts to airports - icao = None for inbound in report.reports: self.AMAN.updateAircraftReport(inbound) - icao = inbound.destination # get the sequence of the airport - if None != icao: - airport = self.AMAN.findAirport(icao) + if None != report.airport: + airport = self.AMAN.findAirport(report.airport) if None != airport: - self.Com.sendSequence(icao, airport.inboundSequence(), airport.WeatherModel) + self.Com.sendSequence(report.airport, airport.inboundSequence(), airport.WeatherModel) except zmq.ZMQError as error: if zmq.EAGAIN == error.errno: