Changeset 394:d85637f7b989


Ignore:
Timestamp:
12/22/12 10:26:57 (12 years ago)
Author:
István Váradi <ivaradi@…>
Branch:
default
Phase:
public
Message:

Added support for unreliable altimeter readings (re #165)

Location:
src/mlx
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • src/mlx/checks.py

    r389 r394  
    465465        logState = self._lastChangeState if \
    466466                   self._lastChangeState is not None else state
    467         return "Altimeter: %.0f hPa at %.0f feet" % \
    468                (logState.altimeter, logState.altitude)
     467        message = "Altimeter: %.0f hPa at %.0f feet" % \
     468                  (logState.altimeter, logState.altitude)
     469        if not logState.altimeterReliable:
     470            message += " (u/r)"
     471        return message
    469472
    470473#---------------------------------------------------------------------------------------
  • src/mlx/fs.py

    r390 r394  
    229229    (float)
    230230    - altimeter: the altimeter setting in hPa (float)
     231    - altimeterReliable: a boolean indicating if the altimeter setting is
     232    reliable
    231233    - ils: the frequency of the ILS radio in MHz (string). Can be None, if
    232234    the frequency is unreliable or meaningless.
  • src/mlx/fsuipc.py

    r390 r394  
    13741374
    13751375        state.altimeter = data[self._monidx_altimeter] / 16.0
     1376        state.altimeterReliable = True
    13761377
    13771378        state.ils = None
     
    18051806        state.navLightsOn = None
    18061807        state.landingLightsOn = None
     1808
     1809        state.altimeterReliable = False
    18071810
    18081811        state.ils = state.nav1
Note: See TracChangeset for help on using the changeset viewer.