initialize the WebUI

This commit is contained in:
Sven Czarnian
2021-11-11 11:09:59 +01:00
parent e450b58428
commit 7762cbf213

View File

@@ -9,6 +9,7 @@ import time
from aman.com import AircraftReport_pb2 from aman.com import AircraftReport_pb2
from aman.com.Euroscope import Euroscope from aman.com.Euroscope import Euroscope
from aman.com.Weather import Weather from aman.com.Weather import Weather
from aman.com.WebUI import WebUI
from aman.config.AircraftPerformance import AircraftPerformance from aman.config.AircraftPerformance import AircraftPerformance
from aman.config.Airport import Airport from aman.config.Airport import Airport
from aman.config.System import System from aman.config.System import System
@@ -33,6 +34,7 @@ class AMAN:
self.AircraftPerformance = None self.AircraftPerformance = None
self.Receiver = None self.Receiver = None
self.Weather = None self.Weather = None
self.WebUi = None
self.Workers = [] self.Workers = []
# initialize the random number generator # initialize the random number generator
@@ -58,6 +60,8 @@ class AMAN:
self.Weather = Weather() self.Weather = Weather()
self.Weather.acquire(self.SystemConfig.Weather) self.Weather.acquire(self.SystemConfig.Weather)
self.WebUi = WebUI()
self.WebUi.acquire(self.SystemConfig.Server, self)
# find the airport configurations and create the workers # find the airport configurations and create the workers
airportsPath = os.path.join(os.path.join(configPath, 'airports'), '*.ini') airportsPath = os.path.join(os.path.join(configPath, 'airports'), '*.ini')
@@ -91,6 +95,9 @@ class AMAN:
self.Weather.release() self.Weather.release()
self.Weather = None self.Weather = None
if None != self.WebUi:
self.WebUi.release()
self.WebUi = None
def updateAircraftReport(self, report : AircraftReport_pb2.AircraftReport): def updateAircraftReport(self, report : AircraftReport_pb2.AircraftReport):
# find the correct worker for the inbound # find the correct worker for the inbound