use the weather system in the central AMAN class
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user