Skip to content

Commit

Permalink
Update docs/examples to use auto versioning
Browse files Browse the repository at this point in the history
  • Loading branch information
julianneswinoga committed May 19, 2024
1 parent 9e51476 commit 0f814e5
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Start FlightGear with `--native-fdm=socket,out,30,localhost,5501,udp --native-fd
these external commands)
"""
if __name__ == '__main__': # NOTE: This is REQUIRED on Windows!
fdm_conn = FDMConnection(fdm_version=24) # May need to change version from 24
fdm_conn = FDMConnection()
fdm_event_pipe = fdm_conn.connect_rx('localhost', 5501, fdm_callback)
fdm_conn.connect_tx('localhost', 5502)
fdm_conn.start() # Start the FDM RX/TX loop
Expand All @@ -48,9 +48,9 @@ if __name__ == '__main__': # NOTE: This is REQUIRED on Windows!

Supported interfaces:
- [x] [Native Protocol](https://wiki.flightgear.org/Property_Tree/Sockets) (currently only UDP)
- [x] Flight Dynamics Model ([`net_fdm.hxx`](https://github.com/FlightGear/flightgear/blob/next/src/Network/net_fdm.hxx))
- [x] Controls ([`net_ctrls.hxx`](https://github.com/FlightGear/flightgear/blob/next/src/Network/net_ctrls.hxx))
- [x] GUI ([`net_gui.hxx`](https://github.com/FlightGear/flightgear/blob/next/src/Network/net_gui.hxx))
- [x] Flight Dynamics Model ([`net_fdm.hxx`](https://github.com/FlightGear/flightgear/blob/next/src/Network/net_fdm.hxx)) version 24, 25
- [x] Controls ([`net_ctrls.hxx`](https://github.com/FlightGear/flightgear/blob/next/src/Network/net_ctrls.hxx)) version 27
- [x] GUI ([`net_gui.hxx`](https://github.com/FlightGear/flightgear/blob/next/src/Network/net_gui.hxx)) version 8
- [ ] [Generic Protocol](https://wiki.flightgear.org/Generic_protocol)
- [x] [Telnet](https://wiki.flightgear.org/Telnet_usage)
- [x] [HTTP](https://wiki.flightgear.org/Property_Tree_Servers)
2 changes: 1 addition & 1 deletion examples/simple_ctrls.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def ctrls_callback(ctrls_data, event_pipe):
Start FlightGear with `--native-ctrls=socket,out,30,localhost,5503,udp --native-ctrls=socket,in,30,localhost,5504,udp`
"""
if __name__ == '__main__': # NOTE: This is REQUIRED on Windows!
ctrls_conn = CtrlsConnection(ctrls_version=27)
ctrls_conn = CtrlsConnection()
ctrls_event_pipe = ctrls_conn.connect_rx('localhost', 5503, ctrls_callback)
ctrls_conn.connect_tx('localhost', 5504)
ctrls_conn.start() # Start the Ctrls RX/TX loop
Expand Down
2 changes: 1 addition & 1 deletion examples/simple_fdm.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def fdm_callback(fdm_data, event_pipe):
these external commands)
"""
if __name__ == '__main__': # NOTE: This is REQUIRED on Windows!
fdm_conn = FDMConnection(fdm_version=24) # May need to change version from 24
fdm_conn = FDMConnection()
fdm_event_pipe = fdm_conn.connect_rx('localhost', 5501, fdm_callback)
fdm_conn.connect_tx('localhost', 5502)
fdm_conn.start() # Start the FDM RX/TX loop
Expand Down
2 changes: 1 addition & 1 deletion examples/simple_gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def gui_callback(gui_data, event_pipe):
Start FlightGear with `--native-gui=socket,out,30,localhost,5504,udp --native-gui=socket,in,30,localhost,5505,udp`
"""
if __name__ == '__main__': # NOTE: This is REQUIRED on Windows!
gui_conn = GuiConnection(gui_version=8)
gui_conn = GuiConnection()
gui_event_pipe = gui_conn.connect_rx('localhost', 5504, gui_callback)
# Note: I couldn't get FlightGear to do anything with the returned data on this interface
# I think it's just ignoring everything. Technically you can send data back though.
Expand Down
4 changes: 2 additions & 2 deletions examples/simple_wing_level.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@ def fdm_callback(fdm_data, event_pipe):
`--native-fdm=socket,out,30,localhost,5501,udp --native-ctrls=socket,out,30,localhost,5503,udp --native-ctrls=socket,in,30,localhost,5504,udp`
"""
if __name__ == '__main__': # NOTE: This is REQUIRED on Windows!
ctrls_conn = CtrlsConnection(ctrls_version=27)
ctrls_conn = CtrlsConnection()
ctrls_event_pipe = ctrls_conn.connect_rx('localhost', 5503, ctrls_callback)
ctrls_conn.connect_tx('localhost', 5504)

fdm_conn = FDMConnection(fdm_version=24) # May need to change version from 24
fdm_conn = FDMConnection()
fdm_event_pipe = fdm_conn.connect_rx('localhost', 5501, fdm_callback)

ctrls_conn.start() # Start the Ctrls RX/TX loop
Expand Down

0 comments on commit 0f814e5

Please sign in to comment.