Line | |
---|
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 |
|
---|
11 | def main():
|
---|
12 | simulator = fs.createSimulator(const.SIM_MSFS9, fs.ConnectionListener(),
|
---|
13 | acft.Aircraft(const.AIRCRAFT_B737))
|
---|
14 | simulator.connect()
|
---|
15 |
|
---|
16 | time.sleep(10)
|
---|
17 | simulator.startMonitoring()
|
---|
18 |
|
---|
19 | while True:
|
---|
20 | time.sleep(1000)
|
---|
21 | simulator.stopMonitoring()
|
---|
22 | simulator.disconnect()
|
---|
23 |
|
---|
24 | time.sleep(5)
|
---|
25 |
|
---|
26 | if __name__ == "__main__":
|
---|
27 | main()
|
---|
Note:
See
TracBrowser
for help on using the repository browser.