From b69c584fb4bda65df69e6e3eca562727cfc985fd Mon Sep 17 00:00:00 2001 From: Sven Czarnian Date: Fri, 24 Sep 2021 22:11:15 +0200 Subject: [PATCH] use the weather system in the central AMAN class --- aman/AMAN.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/aman/AMAN.py b/aman/AMAN.py index 0375668..3dc51d2 100644 --- a/aman/AMAN.py +++ b/aman/AMAN.py @@ -6,6 +6,7 @@ import sys from aman.com import AircraftReport_pb2 from aman.com.Euroscope import Euroscope +from aman.com.Weather import Weather from aman.config.AircraftPerformance import AircraftPerformance from aman.config.Airport import Airport from aman.config.System import System @@ -29,6 +30,7 @@ class AMAN: self.systemConfig = None self.aircraftPerformance = None self.receiver = None + self.weather = None self.workers = [] self.inbounds = {} @@ -46,6 +48,8 @@ class AMAN: else: print('Parsed PerformanceData.ini. Extracted ' + str(len(self.aircraftPerformance.aircrafts)) + ' aircrafts') + self.weather = Weather(self.systemConfig.Weather) + # find the airport configurations and create the workers airportsPath = os.path.join(os.path.join(configPath, 'airports'), '*.ini') for file in glob.glob(airportsPath): @@ -67,6 +71,9 @@ class AMAN: if None != self.receiver: del self.receiver self.receiver = None + if None != self.weather: + del self.weather + self.weather = None for worker in self.workers: worker.stop()