Last change
on this file since 194:daa841678660 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 |
|
---|
3 | import fs
|
---|
4 | import flight
|
---|
5 | import logger
|
---|
6 | import acft
|
---|
7 | import const
|
---|
8 |
|
---|
9 | import time
|
---|
10 | import sys
|
---|
11 |
|
---|
12 | def callback(data, extra):
|
---|
13 | print data
|
---|
14 |
|
---|
15 | def 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 |
|
---|
34 | if __name__ == "__main__":
|
---|
35 | main()
|
---|
Note:
See
TracBrowser
for help on using the repository browser.