add helper functions to update and get information out of the airport data
This commit is contained in:
@@ -7,6 +7,7 @@ import time
|
|||||||
from aman.com import Weather
|
from aman.com import Weather
|
||||||
from aman.com.Euroscope import Euroscope
|
from aman.com.Euroscope import Euroscope
|
||||||
from aman.config.Airport import Airport
|
from aman.config.Airport import Airport
|
||||||
|
from aman.config.AirportSequencing import AirportSequencing
|
||||||
from aman.sys.aco.Colony import Colony
|
from aman.sys.aco.Colony import Colony
|
||||||
from aman.sys.aco.Configuration import Configuration
|
from aman.sys.aco.Configuration import Configuration
|
||||||
from aman.sys.aco.Node import Node
|
from aman.sys.aco.Node import Node
|
||||||
@@ -72,11 +73,6 @@ class Worker(Thread):
|
|||||||
if 0 != (counter % 10):
|
if 0 != (counter % 10):
|
||||||
continue
|
continue
|
||||||
|
|
||||||
# request the current configuration from the server and update it, if useful
|
|
||||||
newConfig = self.WebUi.requestConfiguration(self.Icao, self.Configuration.GngData)
|
|
||||||
if None != newConfig:
|
|
||||||
self.sequencingConfiguration = newConfig
|
|
||||||
|
|
||||||
self.acquireLock()
|
self.acquireLock()
|
||||||
|
|
||||||
# perform some book-keeping
|
# perform some book-keeping
|
||||||
@@ -133,3 +129,14 @@ class Worker(Thread):
|
|||||||
self.Euroscope.sendSequence(self.Icao, sequence, self.WeatherModel)
|
self.Euroscope.sendSequence(self.Icao, sequence, self.WeatherModel)
|
||||||
|
|
||||||
self.releaseLock()
|
self.releaseLock()
|
||||||
|
|
||||||
|
def inboundSequence(self):
|
||||||
|
self.acquireLock()
|
||||||
|
sequence = self.RecedingHorizonControl.sequence()
|
||||||
|
self.releaseLock()
|
||||||
|
return sequence
|
||||||
|
|
||||||
|
def configure(self, configuration : AirportSequencing):
|
||||||
|
self.acquireLock()
|
||||||
|
self.SequencingConfiguration = configuration
|
||||||
|
self.releaseLock()
|
||||||
|
|||||||
Reference in New Issue
Block a user