Changeset 1089:03726a21f686
- Timestamp:
- 03/19/23 14:02:32 (22 months ago)
- Branch:
- python3
- Phase:
- public
- Location:
- src/mlx
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/mlx/fsuipc.py
r1088 r1089 1234 1234 ("radioAltitude", 0x31e4, "d"), 1235 1235 ("altitude", 0x0570, "l"), 1236 ("msfs2020Altitude", 0x0590, "F"), 1236 1237 ("gLoad", 0x11ba, "h"), 1237 1238 ("flapsControl", 0x0bdc, "d"), … … 1413 1414 state.radioAltitude = \ 1414 1415 Handler.fsuipc2radioAltitude(data[self._monidx_radioAltitude]) 1415 state.altitude = data[self._monidx_altitude]/const.FEETTOMETRES/65536.0/65536.0 1416 if self._fsType==const.SIM_MSFS2020: 1417 state.altitude = data[self._monidx_msfs2020Altitude] 1418 else: 1419 state.altitude = data[self._monidx_altitude]/const.FEETTOMETRES/65536.0/65536.0 1416 1420 1417 1421 state.gLoad = data[self._monidx_gLoad] / 625.0 -
src/mlx/pyuipc_sim.py
r1077 r1089 420 420 elif offset==0x0570: # Altitude 421 421 return int(self.altitude * const.FEETTOMETRES * 65536.0 * 65536.0) 422 elif offset==0x0590: # Altitude (MSFS 2020) 423 return self.altitude 422 424 elif offset==0x0578: # Pitch 423 425 return int(self.pitch * 65536.0 * 65536.0 / 360.0) … … 687 689 self.altitude = value / const.FEETTOMETRES / 65536.0 / 65536.0 688 690 self.radioAltitude = self.altitude - 517 691 elif offset==0x0590: # Altitude 692 self.altitude = value 693 self.radioAltitude = self.altitude - 517 689 694 elif offset==0x0578: # Pitch 690 695 self.pitch = value * 360.0 / 65536.0 / 65536.0 … … 1304 1309 const.FEETTOMETRES * 1305 1310 65536.0 * 65536.0)) 1311 self._valueHandlers["msfs2020Altitude"] = ([(0x0590, "F")], 1312 lambda value: value, 1313 lambda word: float(word)) 1306 1314 self._valueHandlers["gLoad"] = ([(0x11ba, "H")], 1307 1315 lambda value: value / 625.0,
Note:
See TracChangeset
for help on using the changeset viewer.