Changeset 450:d009a75685e8


Ignore:
Timestamp:
03/05/13 19:05:56 (11 years ago)
Author:
István Váradi <ivaradi@…>
Branch:
xplane
Parents:
431:207f92566e4f (diff), 449:7ee0679c217b (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Phase:
public
Message:

Merged with the main branch

Location:
src/mlx
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • src/mlx/checks.py

    r430 r450  
    10541054    def isCondition(self, flight, aircraft, oldState, state):
    10551055        """Check if the fault condition holds."""
    1056         return state.gLoad>2.0 and (flight.stage!=const.STAGE_LANDING or \
    1057                                     state.radioAltitude>=50)
     1056        return state.gLoad>2.0 and not state.onTheGround and \
     1057          (flight.stage!=const.STAGE_LANDING or state.radioAltitude>=50)
    10581058
    10591059    def logFault(self, flight, aircraft, logger, oldState, state):
     
    11221122                 (flight.stage in
    11231123                  [const.STAGE_CRUISE, const.STAGE_DESCENT,
    1124                    const.STAGE_LANDING, const.STAGE_GOAROUND] or \
     1124                   const.STAGE_GOAROUND] or \
     1125                  (flight.stage==const.STAGE_LANDING  and
     1126                   state.groundSpeed>50.0) or \
    11251127                  ((not state.autoXPDR or \
    11261128                    (self._liftOffTime is not None and
     
    12391241class OverspeedChecker(PatientFaultChecker):
    12401242    """Check if Vne has been exceeded."""
    1241     def __init__(self, timeout = 5.0):
     1243    def __init__(self, timeout = 30.0):
    12421244        """Construct the checker."""
    12431245        super(OverspeedChecker, self).__init__(timeout = timeout)
     
    13081310        return flight.stage in [const.STAGE_DESCENT, const.STAGE_LANDING,
    13091311                                const.STAGE_TAXIAFTERLAND] and \
     1312            state.reverser and \
    13101313            state.groundSpeed<aircraft.reverseMinSpeed and max(state.reverser)
    13111314
  • src/mlx/checks.py

    r448 r450  
    954954        """Check if the fault condition holds."""
    955955        if flight.stage==const.STAGE_CRUISE:
    956             bankLimit = 30
     956            isDH8DXplane = flight.aircraftType==const.AIRCRAFT_DH8D and \
     957                           (flight.fsType==const.SIM_XPLANE10 or
     958                            flight.fsType==const.SIM_XPLANE9)
     959            bankLimit = 35 if isDH8DXplane else 30
    957960        elif flight.stage in [const.STAGE_TAKEOFF, const.STAGE_CLIMB,
    958961                              const.STAGE_DESCENT, const.STAGE_LANDING]:
     
    965968    def logFault(self, flight, aircraft, logger, oldState, state):
    966969        """Log the fault."""
     970        message = "Bank too steep (%.1f)" % (state.bank,)
    967971        flight.handleFault(BankChecker, state.timestamp,
    968                            FaultChecker._appendDuring(flight, "Bank too steep"),
     972                           FaultChecker._appendDuring(flight, message),
    969973                           2)
    970974
  • src/mlx/gui/gui.py

    r430 r450  
    493493            self.reset()
    494494
    495     def enableFlightInfo(self):
     495    def enableFlightInfo(self, aircraftType):
    496496        """Enable the flight info tab."""
    497         self._flightInfo.enable()
     497        self._flightInfo.enable(aircraftType)
    498498
    499499    def cancelFlight(self):
  • src/mlx/gui/gui.py

    r436 r450  
    6868        self._flight = None
    6969        self._simulator = None
     70        self._fsType = None
    7071        self._monitoring = False
    7172
     
    205206
    206207    @property
     208    def fsType(self):
     209        """Get the flight simulator type."""
     210        return self._fsType
     211
     212    @property
    207213    def entranceExam(self):
    208214        """Get whether an entrance exam is about to be taken."""
     
    425431            self._wizard.connected(fsType, descriptor)
    426432        self._reconnecting = False
     433        self._fsType = fsType
    427434        self._listenHotkeys()
    428435
  • src/mlx/web.py

    r430 r450  
    6363                      "TU3"  : const.AIRCRAFT_T134,
    6464                      "TU5"  : const.AIRCRAFT_T154,
    65                       "YK4"  : const.AIRCRAFT_YK40 }
     65                      "YK4"  : const.AIRCRAFT_YK40,
     66                      "146"  : const.AIRCRAFT_B462 }
    6667
    6768    TYPE2TYPECODE = { const.AIRCRAFT_B736  : "736",
     
    8081                      const.AIRCRAFT_T134  : "TU3",
    8182                      const.AIRCRAFT_T154  : "TU5",
    82                       const.AIRCRAFT_YK40  : "YK4" }
     83                      const.AIRCRAFT_YK40  : "YK4",
     84                      const.AIRCRAFT_B462  : "146" }
    8385
    8486    @staticmethod
Note: See TracChangeset for help on using the changeset viewer.