Ignore:
Timestamp:
05/01/12 08:29:24 (12 years ago)
Author:
István Váradi <ivaradi@…>
Branch:
default
Phase:
public
Message:

Implemented ACARS sending

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/mlx/acft.py

    r136 r139  
    88import util
    99
     10import sys
    1011import time
     12import traceback
    1113
    1214#---------------------------------------------------------------------------------------
     
    5961            self._checkers.append(checks.VisibilityChecker())
    6062
     63        # FIXME: we should have a central data model object, and not collect
     64        # the data from the GUI. However, some pieces of data (e.g. V-speeds,
     65        # etc. that is entered into the GUI) *should* be a part of the GUI and
     66        # queried from it, so the model should have a reference to the GUI as
     67        # well and access such data via the GUI!
     68        if flight.config.onlineACARS:
     69            self._checkers.append(checks.ACARSSender(flight._gui))
     70
    6171        # Fault checkers
    6272       
     
    105115        return self._flight.logger
    106116
     117    @property
     118    def state(self):
     119        """Get the current aircraft state."""
     120        return self._aircraftState
     121   
    107122    def getFlapsSpeedLimit(self, flaps):
    108123        """Get the speed limit for the given flaps setting."""
     
    119134        """Called when the state of the aircraft changes."""
    120135        for checker in self._checkers:
    121             checker.check(self._flight, self, self._flight.logger,
    122                           self._aircraftState, aircraftState)
     136            try:
     137                checker.check(self._flight, self, self._flight.logger,
     138                              self._aircraftState, aircraftState)
     139            except:
     140                print >> sys.stderr, "Checker", checker, "failed"
     141                traceback.print_exc()
    123142
    124143        self._flight.handleState(self._aircraftState, aircraftState)
Note: See TracChangeset for help on using the changeset viewer.