source: src/mlx/test.py@ 919:2ce8ca39525b

python3
Last change on this file since 919:2ce8ca39525b was 919:2ce8ca39525b, checked in by István Váradi <ivaradi@…>, 4 years ago

Ran 2to3

File size: 829 bytes
Line 
1# Test module
2
3from . import fs
4from . import flight
5from . import logger
6from . import acft
7from . import const
8
9import time
10import sys
11
12def callback(data, extra):
13 print(data)
14
15def main():
16 with open(sys.argv[1], "wt") as output:
17 fl = flight.Flight(logger.Logger(output = output))
18 fl.cruiseAltitude = 18000
19 fl.aircraftType = const.AIRCRAFT_DH8D
20 fl.aircraft = acft.Aircraft.create(fl)
21 #fl._stage = const.STAGE_LANDING
22 simulator = fs.createSimulator(const.SIM_MSFS9, fs.ConnectionListener(),
23 fl.aircraft)
24 fl.simulator = simulator
25
26 simulator.connect()
27 simulator.startMonitoring()
28
29 fl.wait()
30
31 simulator.stopMonitoring()
32 simulator.disconnect()
33
34if __name__ == "__main__":
35 main()
Note: See TracBrowser for help on using the repository browser.