Changeset 1063:b2b67f680d11 for src
- Timestamp:
- 09/25/22 12:52:51 (2 years ago)
- Branch:
- python3
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/mlx/xplane.py
r1054 r1063 1758 1758 TYPE_FLOAT) 1759 1759 1760 self._apCMDStatusIndex = len(data) 1761 self._addDatarefWithIndexMember(data, 1762 "laminar/B738/autopilot/cmd_a_status", 1763 TYPE_FLOAT) 1764 self._addDatarefWithIndexMember(data, 1765 "laminar/B738/autopilot/cmd_b_status", 1766 TYPE_FLOAT) 1767 1768 self._apHeadingIndex = len(data) 1769 self._addDatarefWithIndexMember(data, 1770 "laminar/B738/autopilot/hdg_sel_status", 1771 TYPE_FLOAT) 1772 self._addDatarefWithIndexMember(data, 1773 "laminar/B738/hud/hdg_bug_tape", 1774 TYPE_FLOAT) 1775 1776 self._apAltitudeIndex = len(data) 1777 self._addDatarefWithIndexMember(data, 1778 "laminar/B738/autopilot/alt_hld_status", 1779 TYPE_FLOAT) 1780 1760 1781 1761 1782 def getAircraftState(self, aircraft, timestamp, data): … … 1796 1817 1797 1818 state.spoilersArmed = data[self._spoilersArmedIndex]!=0 1819 1820 state.apMaster = \ 1821 data[self._apCMDStatusIndex]==1 or \ 1822 data[self._apCMDStatusIndex+1]==1 1823 1824 mcpHeadingHoldStatus = data[self._apHeadingIndex] 1825 mcpHeadingBugStatus = data[self._apHeadingIndex+1] 1826 state.apHeadingHold = mcpHeadingHoldStatus!=0 and \ 1827 (mcpHeadingBugStatus<=0.5 and mcpHeadingBugStatus>=-0.5) 1828 1829 state.apAltitudeHold = data[self._apAltitudeIndex]==1 1798 1830 1799 1831 return state
Note:
See TracChangeset
for help on using the changeset viewer.