1
0
Fork 0
Commit graph

10 commits

Author SHA1 Message Date
Julian Smith
99bcc3ba24 scripts/python/FlightGear.py: ls() now returns typed values. 2021-04-18 12:12:50 +01:00
Julian Smith
6aa0e4a5cb scripts/python/FlightGear.py: fixed handling of large outputs.
Telnet.expect() can return short result, so _getresp() needs to call it in a
loop.
2021-04-15 17:23:58 +01:00
Julian Smith
797f02f9dd Allow listing of property children via telnet.
Adds new ls2 command with machine-readable output.
2021-03-27 22:37:47 +00:00
Julian Smith
cb1cf90490 scripts/python/FlightGear.py: Fix setting property to True.
On flightgear side, the string 'True' is not treated as bool true, so if a
property is set to python True, we need to send the string 'true' instead.
2021-03-06 08:52:20 +00:00
Scott Giese
df67cc2bd9 Python: best practices
Check eq/ne
Anticipate file issues
Ensure file closure
2020-08-29 12:07:15 -05:00
Thomas LESNE
31f434d3ad Migrate FGFSDemo.py, FlightGear.py, demo.py and nasal_api_doc.py to Python 3
Also apply minor changes to FGFSDemo.py and demo.py: add python3
shebang, make the scripts executable, improve an error message.
This closes ticket #224:
<https://sourceforge.net/p/flightgear/flightgear/merge-requests/224/>.
2020-08-05 14:01:57 +02:00
mfranz
1d15a9272b George PATTERSON:
"Flightgear.py
- Added the procedures view_next and view_prev

demo.py
- altered the wait five seconds to the new property path and allowed for
the script to be started after five seconds of simulation file
(/sim/time/elapsed-sec).
- the section of code was changed to a pythonism as python does not
support do-while loops, instead you break out of a continuous loop.
- Commented out the fg.wait_for_prop_eq() method as I haven't rewritten
that part of the code yet. Not sure of the best way to do that. Those
lines may not be necessary any more."


mf: removed trailing spaces; I updated the pyc, too, but I really think
    it shouldn't be in CVS at all.(?)
2006-10-29 12:34:26 +00:00
curt
9c49534907 Attempt #1 to sort out confusion between left / right / parking brake
controls in the cockpit vs. which wheels they apply to.  FlightGear now
sets /controls/gear/brake-left, /controls/gear/brake-right, and
/controls/gear/brake-parking.  It should be up to the FDM to sort out
which wheels under which circumstances are affected by these controls
and ultimately what happens to the physical motion of the aircraft.
2004-01-12 17:39:41 +00:00
curt
6ac85b8625 Fixed a bug in FlightGear.py. Splitting name,value,type using whitespace
failed on /sim/time/gmt-string because the raw value contains an embedded
space.  Now I use a regex instead of a plain split().  I also removed the
view_next and view_prev functions.  These will have to be replaced with
command properties.

I've also added a FGFSDemo.py script which is a python version of David's java program.
2002-07-22 23:25:28 +00:00
curt
f69a1c8f66 Added a scripts subdirectory with support for running external python
scripts that communicate with FlightGear via it's "telnet" interface.
2002-05-15 21:45:39 +00:00