Skip to content

Commit b5cf4ef

Browse files
authored
Merge pull request odwdinc#61 from CodeBizarre/spelling-fixes
Improve README, and add missing EOF newlines
2 parents 54f0972 + 947fa2c commit b5cf4ef

File tree

3 files changed

+17
-19
lines changed

3 files changed

+17
-19
lines changed

README.md

Lines changed: 15 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -11,20 +11,20 @@ Full documentation for this example can be found at [https://msfs2020.cc](https:
1111

1212
## Python interface example
1313

14-
````
14+
```py
1515
from SimConnect import *
1616

1717
# Create SimConnect link
1818
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
2020
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.
2726

27+
# To find and set timeout of cached data to 200ms:
2828
altitude = aq.find("PLANE_ALTITUDE")
2929
altitude.time = 200
3030

@@ -46,7 +46,7 @@ event_to_trigger = ae.find("AP_ALT_VAR_SET_ENGLISH") # Sets AP autopilot hold l
4646
event_to_trigger(target_altitude)
4747
sm.quit()
4848
exit()
49-
````
49+
```
5050

5151
## HTTP interface example
5252

@@ -108,20 +108,20 @@ Arguments to pass:
108108

109109
Description: Triggers an event in the simulator
110110

111-
## Runing SimConnect on other system.
111+
## Running SimConnect on a separate system.
112112

113113
#### Note: At this time SimConnect can only run on Windows hosts.
114114

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.
116116
#### Sample SimConnect.cfg:
117-
```
117+
```ini
118118
; Example SimConnect client configurations
119119
[SimConnect]
120120
Protocol=IPv4
121121
Address=<ip of server>
122122
Port=500
123123
```
124-
To enable the host running the sim to share over network,
124+
To enable the host running the sim to share over network,
125125

126126
add \<Address\>0.0.0.0\</Address\>
127127

@@ -131,7 +131,7 @@ SimConnect.xml can be located at
131131
#### `%AppData%\Microsoft Flight Simulator\SimConnect.xml`
132132

133133
#### Sample SimConnect.xml:
134-
```
134+
```xml
135135
<?xml version="1.0" encoding="Windows-1252"?>
136136

137137
<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:
158158

159159
## Events and Variables
160160

161-
Below are links to the Microsoft documentation
161+
Below are links to the Microsoft documentation
162162

163163
[Function](https://docs.microsoft.com/en-us/previous-versions/microsoft-esp/cc526983(v=msdn.10))
164164

165165
[Event IDs](https://docs.microsoft.com/en-us/previous-versions/microsoft-esp/cc526980(v=msdn.10))
166166

167167
[Simulation Variables](https://docs.microsoft.com/en-us/previous-versions/microsoft-esp/cc526981(v=msdn.10))
168-
169-

SimConnect/EventList.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1222,4 +1222,4 @@ class __G1000_MFD(EventHelper):
12221222
(b'G1000_MFD_PAGE_KNOB_INC', "Step up through the individual pages.", "Shared Cockpit"),
12231223
(b'G1000_MFD_PAGE_KNOB_DEC', "Step down through the individual pages.", "Shared Cockpit"),
12241224
]
1225-
# G1000_MFD_SOFTKEY1, G1000_MFD_SOFTKEY12 Initiate the action for the icon displayed in the softkey position. Shared Cockpit
1225+
# G1000_MFD_SOFTKEY1, G1000_MFD_SOFTKEY12 Initiate the action for the icon displayed in the softkey position. Shared Cockpit

glass_server.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -471,4 +471,4 @@ def custom_emergency(emergency_type):
471471
return text_to_return
472472

473473

474-
app.run(host='0.0.0.0', port=5000, debug=True)
474+
app.run(host='0.0.0.0', port=5000, debug=True)

0 commit comments

Comments
 (0)