Ignore:
Timestamp:
12/28/12 12:13:29 (11 years ago)
Author:
István Váradi <ivaradi@…>
Branch:
default
Phase:
public
Message:

Added support for querying, displaying and simulating the QNH value (re #175)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/mlx/pyuipc_sim.py

    r390 r408  
    281281
    282282        self.altimeter = 1013.0
     283        self.qnh = 1011.2
    283284
    284285        self.nav1 = 117.3
     
    501502        elif offset==0x0e92:       # Wind direction
    502503            return int(self.windDirection * 65536.0 / 360.0)
     504        elif offset==0x0ec6:       # QNH
     505            return int(self.qnh * 16.0)
    503506        elif offset==0x11ba:       # G-Load
    504507            return int(self.gLoad * 625.0)
     
    761764        elif offset==0x0e92:       # Wind direction
    762765            self.windDirection = value * 360.0 / 65536.0
     766        elif offset==0x0ec6:       # QNH
     767            self.qnh = value / 16.0
    763768        elif offset==0x11ba:       # G-Load
    764769            self.gLoad = value / 625.0
     
    12971302                                           lambda value: value,
    12981303                                           lambda word: int(word))
    1299         self._valueHandlers["qnh"] = ([(0x0330, "H")],
     1304        self._valueHandlers["altimeter"] = ([(0x0330, "H")],
     1305                                            lambda value: value / 16.0,
     1306                                            lambda word: int(float(word)*16.0))
     1307        self._valueHandlers["qnh"] = ([(0x0ec6, "H")],
    13001308                                      lambda value: value / 16.0,
    13011309                                      lambda word: int(float(word)*16.0))
Note: See TracChangeset for help on using the changeset viewer.