Rev | Line | |
---|
[4] | 1 | # Test module
|
---|
| 2 |
|
---|
| 3 | import fs
|
---|
| 4 | import acft
|
---|
| 5 | import const
|
---|
| 6 | import time
|
---|
| 7 |
|
---|
| 8 | def callback(data, extra):
|
---|
| 9 | print data
|
---|
| 10 |
|
---|
[5] | 11 | def main():
|
---|
[6] | 12 | simulator = fs.createSimulator(const.SIM_MSFS9, fs.ConnectionListener(),
|
---|
[5] | 13 | acft.Aircraft(const.AIRCRAFT_B737))
|
---|
| 14 | simulator.connect()
|
---|
[4] | 15 |
|
---|
[5] | 16 | time.sleep(10)
|
---|
| 17 | simulator.startMonitoring()
|
---|
[4] | 18 |
|
---|
| 19 | while True:
|
---|
| 20 | time.sleep(1000)
|
---|
[5] | 21 | simulator.stopMonitoring()
|
---|
| 22 | simulator.disconnect()
|
---|
| 23 |
|
---|
| 24 | time.sleep(5)
|
---|
[4] | 25 |
|
---|
| 26 | if __name__ == "__main__":
|
---|
| 27 | main()
|
---|
Note:
See
TracBrowser
for help on using the repository browser.