source: src/mlx/test.py@ 203:bc3c9d58a921

Last change on this file since 203:bc3c9d58a921 was 27:d95d48685969, checked in by István Váradi <ivaradi@…>, 13 years ago

Created icons, reorganized sources and made the Windows installer work

File size: 793 bytes
Line 
1# Test module
2
3import fs
4import flight
5import logger
6import acft
7import 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.