use the new protocol
This commit is contained in:
@@ -28,16 +28,14 @@ class ComThread(Thread):
|
|||||||
report.ParseFromString(msg)
|
report.ParseFromString(msg)
|
||||||
|
|
||||||
# try to associate the received aircrafts to airports
|
# try to associate the received aircrafts to airports
|
||||||
icao = None
|
|
||||||
for inbound in report.reports:
|
for inbound in report.reports:
|
||||||
self.AMAN.updateAircraftReport(inbound)
|
self.AMAN.updateAircraftReport(inbound)
|
||||||
icao = inbound.destination
|
|
||||||
|
|
||||||
# get the sequence of the airport
|
# get the sequence of the airport
|
||||||
if None != icao:
|
if None != report.airport:
|
||||||
airport = self.AMAN.findAirport(icao)
|
airport = self.AMAN.findAirport(report.airport)
|
||||||
if None != 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:
|
except zmq.ZMQError as error:
|
||||||
if zmq.EAGAIN == error.errno:
|
if zmq.EAGAIN == error.errno:
|
||||||
|
|||||||
Reference in New Issue
Block a user