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
- 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
Examples:
var tied = foo.getAttribute("TIED");
foo.setAttribute("USERARCHIVE", 1);
Both methods accept attribute strings "READ", "WRITE", "ARCHIVE",
"TRACE_READ", "TRACE_WRITE", and "USERARCHIVE". getAttribute() does
additionally accept "TIED" (although this isn't an SGPropertyNode::Attribute).
Attribute "REMOVED" is not supported.
registered with dynamic_view.register() and is called in the main loop,
replacing the default plane/helicopter function. This has access to
all class functions/members and sets me.heading_offset, me.pitch_offset,
and me.roll_offset, which are then used as new view offsets.
The function can also do other things, such as call the lookat() method
to temporarily set heading and pitch. See the bo105 for an example.
While further minor changes are to be expected, the configuration method
seems to be the way to go.
- 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. :-)
- fix sliders: revisions 1.43/1.44 had introduced a mandatory <min-lb>;
if that was missing, a slider without handle was generated, and a click
on the slider lead to a crash.
-> check for both <min-lb> and <max-lb> and set default values
0, respectively 100
var min = w.getNode("min-lb", 1).getValue();
var max = w.getNode("max-lb", 1).getValue();
slider.set("min", min != nil ? min : 0);
slider.set("max", max != nil ? max : 100);
preferences.xml gui/menubar.xml gui/dialogs/rendering.xml
Added Files:
Nasal/multiplayer.nas gui/dialogs/chat.xml
gui/dialogs/chat_full.xml:
the data part of Stuarts multiplayer/chat patch
tank indices, so that changing drop tanks automatically modifies the
corresponding FDM tank capacity (and load, if it is too high).
Add the new tank stuff to the harrier config, along with a few new
items (e.g. AMRAAMs on the outboard pylons) that aren't in the 3D
model yet, but correspond to actual usage.
An IRC discussion about shavlir's (really nice) harrier model showed
that it had its own version of something like the Fuel & Weight
dialog, developed because the existing subsystem only supported
sliders and not "combo box" style selection for specific external
stores. That seemed sub-optimal, so I spent a few hours extending the
F&W dialog to do this and forward-ported the harrier to use it.
Check the harrier-set.xml file for an example. Basically, the weight
dialog reads a list of options for each weight listed under
/sim/weight[n] and manages a "selected" proprty telling us which one
is in use. The FDM code can then read out the weight-lb property as
before, and the model animations can use the selected option to
predicate drawing the appropriate 3D content. It seems to work pretty
well.