Changeset 1109:986abbce32ef for src


Ignore:
Timestamp:
09/23/23 09:03:43 (14 months ago)
Author:
István Váradi <ivaradi@…>
Branch:
python3
Phase:
public
Message:

The flaps request and deflection are queried properly for the Felis Tu154-B2

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/mlx/xplane.py

    r1103 r1109  
    22642264                                        TYPE_FLOAT)
    22652265
     2266        self._flapsControlIndex = len(data)
     2267        self._addDatarefWithIndexMember(data,
     2268                                        "sim/custom/controll/flaps_lever",
     2269                                        TYPE_FLOAT)
     2270        self._flapsIndex = len(data)
     2271        self._addDatarefWithIndexMember(data,
     2272                                        "sim/flightmodel/controls/fla1_def",
     2273                                        (TYPE_FLOAT_ARRAY, 2, 8))
     2274
    22662275    def getAircraftState(self, aircraft, timestamp, data):
    22672276        """Get the aircraft state.
     
    22742283        state.parking = data[self._parkingBrakeIndex]!=0
    22752284        state.cog = data[self._cgIndex]/100.0
     2285        state.flapsSet = data[self._flapsControlIndex]
     2286        state.flaps = data[self._flapsIndex][0]
    22762287
    22772288        return state
Note: See TracChangeset for help on using the changeset viewer.