source: src/mlx/test.py@ 522:63e057098ed7

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