@@ -11,20 +11,20 @@ Full documentation for this example can be found at [https://msfs2020.cc](https:
11
11
12
12
## Python interface example
13
13
14
- ````
14
+ ``` py
15
15
from SimConnect import *
16
16
17
17
# Create SimConnect link
18
18
sm = SimConnect()
19
- # Note the default _time is 2000 as to refreshed at 2s
19
+ # Note the default _time is 2000 to be refreshed every 2 seconds
20
20
aq = AircraftRequests(sm, _time = 2000 )
21
- # Use _time=ms where ms is the millsec to refresh data to cash.
22
- # setting ms to 0 will disable data cashing and allwas pull new data form sim.
23
- # There is still a timeout of 4 trys with a 10ms delay between checks.
24
- # If no data is received in 40ms the value will be set to -999999
25
- # Each Requests can be fine tuned by seting the time pram.
26
- # To find and set time out of cashed data to 200ms
21
+ # Use _time=ms where ms is the time in milliseconds to cache the data.
22
+ # Setting ms to 0 will disable data caching and always pull new data from the sim.
23
+ # There is still a timeout of 4 tries with a 10ms delay between checks.
24
+ # If no data is received in 40ms the value will be set to None
25
+ # Each request can be fine tuned by setting the time param.
27
26
27
+ # To find and set timeout of cached data to 200ms:
28
28
altitude = aq.find(" PLANE_ALTITUDE" )
29
29
altitude.time = 200
30
30
@@ -46,7 +46,7 @@ event_to_trigger = ae.find("AP_ALT_VAR_SET_ENGLISH") # Sets AP autopilot hold l
46
46
event_to_trigger(target_altitude)
47
47
sm.quit()
48
48
exit ()
49
- ````
49
+ ```
50
50
51
51
## HTTP interface example
52
52
@@ -108,20 +108,20 @@ Arguments to pass:
108
108
109
109
Description: Triggers an event in the simulator
110
110
111
- ## Runing SimConnect on other system.
111
+ ## Running SimConnect on a separate system.
112
112
113
113
#### Note: At this time SimConnect can only run on Windows hosts.
114
114
115
- Creat a file called SimConnect.cfg in the same folder as your script.
115
+ Create a file called SimConnect.cfg in the same folder as your script.
116
116
#### Sample SimConnect.cfg:
117
- ```
117
+ ``` ini
118
118
; Example SimConnect client configurations
119
119
[SimConnect]
120
120
Protocol =IPv4
121
121
Address =<ip of server>
122
122
Port =500
123
123
```
124
- To enable the host running the sim to share over network,
124
+ To enable the host running the sim to share over network,
125
125
126
126
add \< Address\> 0.0.0.0\< /Address\>
127
127
@@ -131,7 +131,7 @@ SimConnect.xml can be located at
131
131
#### ` %AppData%\Microsoft Flight Simulator\SimConnect.xml `
132
132
133
133
#### Sample SimConnect.xml:
134
- ```
134
+ ``` xml
135
135
<?xml version =" 1.0" encoding =" Windows-1252" ?>
136
136
137
137
<SimBase .Document Type =" SimConnect" version =" 1,0" >
@@ -158,12 +158,10 @@ Python 64-bit is needed. You may see this Error if running 32-bit python:
158
158
159
159
## Events and Variables
160
160
161
- Below are links to the Microsoft documentation
161
+ Below are links to the Microsoft documentation
162
162
163
163
[ Function] ( https://docs.microsoft.com/en-us/previous-versions/microsoft-esp/cc526983(v=msdn.10) )
164
164
165
165
[ Event IDs] ( https://docs.microsoft.com/en-us/previous-versions/microsoft-esp/cc526980(v=msdn.10) )
166
166
167
167
[ Simulation Variables] ( https://docs.microsoft.com/en-us/previous-versions/microsoft-esp/cc526981(v=msdn.10) )
168
-
169
-
0 commit comments