Skip to content

Commit d1a2f4f

Browse files
committed
Example write variable
1 parent faa73d5 commit d1a2f4f

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

README.md

+3
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@ sm = SimConnectMobiFlight()
2222
vr = MobiFlightVariableRequests(sm)
2323
vr.clear_sim_variables()
2424

25+
# Example write variable
26+
vr.set("0 (>L:A32NX_COCKPIT_DOOR_LOCKED)")
27+
2528
while True:
2629
alt_ground = vr.get("(A:GROUND ALTITUDE,Meters)")
2730
alt_plane = vr.get("(A:PLANE ALTITUDE,Feet)")

src/example.py

+3
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ def setupLogging(logFileName):
2020
vr = MobiFlightVariableRequests(sm)
2121
vr.clear_sim_variables()
2222

23+
# Example write variable
24+
vr.set("0 (>L:A32NX_COCKPIT_DOOR_LOCKED)")
25+
2326
while True:
2427
alt_ground = vr.get("(A:GROUND ALTITUDE,Meters)")
2528
alt_plane = vr.get("(A:PLANE ALTITUDE,Feet)")

0 commit comments

Comments
 (0)