Changeset 1122:84d0a094eb3f for src/mlx
- Timestamp:
- 11/28/23 18:23:58 (12 months ago)
- Branch:
- python3
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/mlx/xplane.py
r1121 r1122 2304 2304 (TYPE_FLOAT_ARRAY, 2, 8)) 2305 2305 2306 self._spoilersIndex = len(data) 2307 self._addDatarefWithIndexMember(data, 2308 "sim/flightmodel2/wing/spoiler1_deg", 2309 (TYPE_FLOAT_ARRAY, 2, 0)) 2310 self._addDatarefWithIndexMember(data, 2311 "sim/flightmodel2/wing/spoiler2_deg", 2312 (TYPE_FLOAT_ARRAY, 2, 2)) 2313 2306 2314 def getAircraftState(self, aircraft, timestamp, data): 2307 2315 """Get the aircraft state. … … 2316 2324 state.flapsSet = data[self._flapsControlIndex] 2317 2325 state.flaps = data[self._flapsIndex][0] 2326 2327 state.spoilersExtension = max( 2328 max(data[self._spoilersIndex])*100.0/50.0, 2329 max(data[self._spoilersIndex+1])*100.0/45.0) 2330 if state.spoilersExtension<=10.0: 2331 state.spoilersExtension = 0.0 2318 2332 2319 2333 return state
Note:
See TracChangeset
for help on using the changeset viewer.