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