mfranz
2ea8466111
steering: vim typo
2008-09-26 22:53:57 +00:00
mfranz
d5605e2280
steering: fix after nasal update
2008-09-26 22:48:48 +00:00
mfranz
917cace77c
string.nas: remove forgotten debug message
...
props.nas: replace some "arg[*]" by named args
aircraft.nas: load aircraft data only if the file exists (to avoid warning)
debug.nas: no space before colon & fixed comment & cosmetics
2008-08-14 22:13:25 +00:00
mfranz
30cd488f90
data.load(): use io.read_properties() (fixes *.sav loading bug)
2008-07-11 22:50:58 +00:00
mfranz
3be5c6956b
io: use default attribs rather than a hard-coded number for globals identification
...
gui/tutorial/aircraft: use io.read_properties()/io.write_properties()
2008-07-11 09:37:33 +00:00
mfranz
d86b1b9c74
string.nas: new functions string.join() and string.replace()
...
debug.nas: let benchmark() repeat tested function
io.nas: cosmetics
aircraft.nas: initialize time property only once
2008-06-21 07:10:32 +00:00
mfranz
b6d987453f
data.add(): use props.nodeList() function
2008-05-15 15:20:11 +00:00
mfranz
c78327ee21
- lowpass: work with delta-sec = nil
...
- cosmetics
2008-04-23 22:01:44 +00:00
mfranz
6d3676639b
revert bad livery.current initialization
2008-03-01 12:01:23 +00:00
mfranz
4db470acd4
move MP livery update parts from the livery class into a separate
...
livery_update class and add an optional third argument to its constructor:
a callback function that's called whenever the class noticed a livery
change
2008-03-01 09:49:57 +00:00
mfranz
e9e234410d
initialize livery.current at livery.init()
2008-02-29 21:28:34 +00:00
mfranz
713685f275
add aircraft.livery methods for updating the livery in MP loaded aircraft
2008-02-29 17:17:40 +00:00
mfranz
217cbcae34
add mod-up action to magneto keys, and ignore that in the controls wrapper;
...
This allows to implement car-like combined magneto/starter switches.
2008-02-23 18:18:55 +00:00
vmmeazza
0e0b9b4b06
Add a new class which enables formations to be changed during runtime. A modification of the Livery Class
2008-02-15 14:09:37 +00:00
mfranz
46f66693e2
- make timer.stop() return "me"
...
- make door.move() only spawn an interpolate event if the target value
differs from the current pos (fixes brake problem in the dhc6)
2008-02-05 12:39:56 +00:00
mfranz
7c9566860d
Stewart ANDREASON: fix broken index calculation in livery.set()
2007-12-17 21:49:52 +00:00
mfranz
9b7eafd658
use sim time delta for the lowpass, not realtime delta
2007-11-06 21:22:06 +00:00
mfranz
2bcddab9b6
setlistener(): accessing the node via cmdarg() is now depreciated. Use
...
a regular function argument for that. Note the "n" in this example:
setlistener("/sim/current-view/view-number", func(n) {
setprop("/sim/hud/visibility", !n.getValue());
}, 1);
2007-10-15 18:27:42 +00:00
mfranz
dfd21c722d
- add more "var" keywords, fix indentation, drop some parentheses,
...
fix comments, consistency fixes, ...
- aircraft.nas: angular_lowpass -> minor speedup
2007-10-07 15:12:05 +00:00
mfranz
96a8a9657f
- drop redundant aircraft namespace
...
- use getprop() instead of props.Node.getValue() here because it's faster
2007-07-06 21:28:07 +00:00
mfranz
d6ff854aa5
add class for variable inverval lowpass filtering of angles. (If there's
...
a better method or name for it, please tell me.) This is primarily for
smoothing view heading angles.
2007-07-06 20:31:14 +00:00
mfranz
ce356a350e
don't multiply with nil
2007-06-20 15:16:29 +00:00
mfranz
d9910b27e7
simplification
2007-06-12 22:08:18 +00:00
mfranz
a1fd54cfdf
aircraft.nas, gui.nas: adapt loadxml for absolute paths, drop second fgcommand arg
...
debug.nas, tutorial.nas: adapt for abs. paths
fuel.nas: cleanup
screen.nas: don't remove listeners -- that's done automatically by removind
the node in NasalSys.cxx
xml.nas: minor documentation fix
2007-06-12 16:20:55 +00:00
mfranz
0fcdafe2aa
add autotrim class to help with trimming (read the class documentation for
...
an explanation). There's no button/key using this by default (yet?).
2007-06-07 10:12:03 +00:00
mfranz
71fa47d99d
drop clumsy handling of temporary file data branch, and use the "savexml"
...
fgcommand's temporary <data> argument branch instead
2007-06-06 21:40:47 +00:00
mfranz
c050b436fa
livery handling: add sort option and next()/previous() methods
2007-06-05 14:21:12 +00:00
mfranz
95caf1a918
add livery singleton class that maintains livery XML files.
...
TODO: allow explicit sorting (currently only alphabetic) and add next()
and previous() methods
2007-06-04 13:45:23 +00:00
mfranz
47d675bfd5
- make the HUD and the data class singleton classes
...
- use var everywhere, cosmetics
2007-05-11 18:04:51 +00:00
mfranz
072610c001
aircraft.steering: redefine the controls.applyBrakes() wrapper, too.
...
If this isn't what the aircraft developer wants, then s/he can still
redefine it again afterwards.
2007-05-08 14:22:54 +00:00
mfranz
6b533c19a9
add class that implements differential braking with rudder input
2007-05-08 09:52:13 +00:00
mfranz
24b8156e9f
HUD: only consider i/I/H presses when a HUD is displayed
2007-05-01 19:36:41 +00:00
mfranz
47f5e58005
can't hurt to initialized light.endstate (state after number of sequences)
2007-04-06 21:53:46 +00:00
mfranz
5471f0cd5b
- remove hack around Nasal bug, which is already fixed
...
- add second optional argument to light.blink() method, which
defines which state should be set after the end of the sequences
(defaults: 0)
2007-04-06 21:33:22 +00:00
mfranz
c331a49dea
add optional argument to blink() method:
...
blink() ... set signal generator to unlimited blinking
blink(3) ... set signal generator to blinking only 3 sequences
after turning the switch on.
2007-04-06 20:03:47 +00:00
mfranz
4ebd876c85
- move all module initialization code into one-shot listener
...
- initialize /sim/time/delta-realtime-sec, so that the lowpass filter doesn't
complain if it's starter eraly (of course the results won't be correct
until the delta is real)
2007-02-08 18:42:02 +00:00
mfranz
caf96d76c8
minor documentation fix
2007-02-07 17:06:52 +00:00
mfranz
04de5c67c8
- add all entries in /sim/aircraft-data/path[*] to the save-list, so that one
...
can also write
<sim>
<aircraft-data>
<path>/sim/author</path>
<path>/sim/description</path>
<path>/sim/rtatus</path>
</aircraft-data>
</sim>
in a *-set.xml file instead of using Nasal (aircraft.data.add("/sim/author", ...)
- s/timeN/node/ to match the pattern described in the head comment
- make listener on-shot
2007-01-26 23:33:25 +00:00
mfranz
e3d90ee46c
- don't prepend underscore to aircraft names (this was a leftover from
...
versions that wrote that name to the property tree)
- move HUD part to the bottom. It isn't really part of the library
- cleanup
2007-01-23 17:29:41 +00:00
mfranz
b47d2e2204
respect /sim/startup/save-on-exit
2007-01-22 19:05:35 +00:00
mfranz
97771b69ae
- save aircraft data before the aircraft's Nasal files are executed
...
- make 0 a valid saving interval, and 'nil' or no arg stop the loop
(this is for consistency with settimer() or aircraft.timer() intervals
- smaller fixes, cleanup
2007-01-22 16:49:28 +00:00
mfranz
977910c258
we can't use the setlistener() wrapper here, but need the real thing
2007-01-21 20:44:55 +00:00
mfranz
f61969ed01
add timer class that optionally saves time in the aircraft data file,
...
restores this time at next run and continues from this value. This is
meant for operation hour counters (Hobbs meters) for turbines, etc.
2007-01-21 20:06:05 +00:00
mfranz
722f35903d
only save before the reset is executed, so we can save e.g. the Hobbs time
2007-01-21 00:21:53 +00:00
mfranz
ec18defa4c
the dummy entry is no longer needed; files get only written if they
...
actually contain aircraft settings
2007-01-20 23:13:54 +00:00
mfranz
a73972512d
add class for saving data into aircraft specific files
...
in ~/.fgfs/aircraft-data/ or %APPDATA%\flightgear.org\aircraft-data\
2007-01-20 20:15:06 +00:00
mfranz
41a756a6ba
light class: make the first time-value always "on", even for odd numbered
...
light pattern. This is more robust and doesn't need the reinit listener.
2006-12-13 16:15:27 +00:00
mfranz
923f2b7299
- fix index and restart loop on reinit
...
- cosmetics
2006-12-12 22:42:52 +00:00
mfranz
28323bcec8
new light.new() arguments with light pattern array; error message for old
...
style args
2006-12-06 15:58:03 +00:00
mfranz
a5aae32cc1
whoops; fix return value
2006-12-05 19:32:44 +00:00
mfranz
2cb4354814
- fix switch() method
...
- optimization (and code obfuscation ;-)
2006-12-05 19:17:17 +00:00
mfranz
eff0eecb8f
lowpass: add set() method to set current average
...
light: - only trigger switch action if switch state actually changed
- simplify loop
2006-12-04 10:42:05 +00:00
mfranz
89710547ec
Use a listener to watch the aircraft.light switch. This is slightly more
...
efficient and there's no more potential 0.5 s delay.
2006-12-03 22:20:16 +00:00
mfranz
4ae3ab11df
don't silently fix bad user input -- complain loudly
2006-11-04 11:33:08 +00:00
mfranz
2145558999
documentation fix
2006-11-03 19:39:08 +00:00
mfranz
dabf3f300c
- aircraft.nas: add variable-interval EWMA lowpass filter class
...
- dynamic_view.nas: use aircraft.lowpass() class
This makes the dynamic view independent of the frame rate. Currently,
each filter instance reads out dt on its own, which is a bit inefficient.
I'll change that to just one read for all instances later (when Nasal
implemented predictable module loading order. :-)
2006-11-03 17:38:32 +00:00
mfranz
8ecfdb2a96
add HUD manager class. The old and new HUD code is a bit tedious to handle
...
in keyboard.xml. Better concentrate that on one place.
2006-08-21 08:35:53 +00:00
mfranz
0f97cfccdf
slightly more effective stop() method
2005-06-30 00:18:20 +00:00
ehofman
ca224d0ea3
Melchior FRANZ:
...
- lights are by default off (what was I thinking?!?)
- setters return "me" reference by default, for easier code obfuscation:
foo = aircraft.light.new("/foo").prop().switch(1); :-)
- a few mebmers renamed; light.set() -> light.switch(); nodes are named *N
to avoid collisions and to show relations (switch() <-> switchN)
- yet more (too much?) documentation
2005-04-06 08:18:06 +00:00
ehofman
a978a79d16
Melchior FRANZ:
...
- light class added (for lights and other pulsing/blinking objects)
- fixed and improved documentation
- all property args may be path strings or nodes
- existing nodes aren't overwritten any more
- better naming of class vars (for outside access)
Tested with the bo105 (which I fully ported to use aircraft.nas) and
the fokker70 (which are the only aircraft using the new classes :-)
2005-03-30 09:53:00 +00:00
ehofman
39c82918cd
Melchior has already a nice collection of animation type nasal classes. These will be converted in a Nasal toolbox so everybody can use them without reinventing the wheel.
2005-03-29 11:26:49 +00:00