This isn't the case if the model is destroyed on fgfs exit. To make <unload>
work under these circumstances, one would have to reorder subsystem removal,
but this doesn't seem overly useful, so we'll do it when we really need it.
aircraft models this is only called if they are loaded as AI, not if they
are the model flown by the human pilot. This has technical reasons (too
soon for Nasal/fg), but is useful to distinguish AI and non-AI use, for
example to set a different livery for AI models, or to set different
animation properties.
implement FGNasalModelData class for execution of XML <load> and <unload>
scripts. modelLoaded() is called by the model loader, and the destructor
on branch removal.
modelmgr.cxx:
tilemgr.cxx:
tileentry.[ch]xx:
make scenery and custom objects run their Nasal scripts on loading
and unloading. Let OBJECT_STATIC object not be cached.
<nasal>
<open>print("I'm called on dialog open")</open>
<close>print("I'm called on dialog close")</close>
</nasal>
All Nasal runs in a dialog namespace, so that variables and functions
defined in the <open> block can be used in <binding>s, etc. This is
especially useful for <radio> button handling. See "location-in-air.xml".
mf:
pthread_cancel doesn't seem to work correctly on all supported platforms.
It apparently causes SGBlockingQueue::pop() to correctly leave the thread on
the cancellation point pthread_wait(), but the SGGuard() destructor isn't
called, so the queue mutex remains locked. This triggered an assert() on
pthread_join(). This patch uses an empty ICAO request as signal for the
thread to terminate itself.
I have implemented a Honeywell MK VIII EGPWS emulation for FlightGear.
The MK VIII is an Enhanced Ground Proximity Warning System aimed at
regional turboprop and small turbofan aircrafts such as the Citation,
Citation Bravo, B1900D, Beechcraft 99 and L410.
Frederic Bouvier:
make the MSVC compilation possible. Rearrange base package directories.
The original code selected the most preferable runway combination,
regardless of which combination was currently active. This patch
builds in some additional resistance against change, by keeping
track of which runways are already in use, and forces a change
in active runways only when new (wheather/time of day) conditions
force it to do so, resulting in much more consistent runway assignment.
behavior.
and in the calculation of the launchbar angle (by Vivian).
It also calculates the holdback angle, and sets a Boolean value which
can be used to initiate the release of the catapult strop submodel at
the appropriate moment (new code by Vivian).
control to piston engines that allows external scripts to control the
turbo/supercharger boost programatically by setting this axis to
values in the range [0:1]. It also adds a "turbo-lag" attribute (a
time in seconds) to engines implementing turbocharger spooling delays.
This isn't terribly well tested, but doesn't seem to have broken
anything.
I am attaching a trivial patch that changes the normalization from 24 to
12 in turn_indicator.cxx. With this change, the pa24 tc has a turn
indicator spin value in the property tree of 0.9996 and the same value
for the pa28-161 is 1.0, so there is no harm to a 24 volt electrical
system in this change. Should the battery or alternator put out a lower
voltage than 12 volts, the spin value goes down and the tc shows a
negative turn that increases as the voltage gets less. This file shows
you as the author. If you are comfortable with this change, commit it
to cvs and the tc will be correct even for 12 volt systems.
propeller pitch stops for constant speed propellers. The default
values are the same as the previous hard-coded values. The new
attributes, "fine-stop" and "coarse-stop", are documented in the base
package, Docs/README.yasim.
- remove cleanup handler that unlocks unused mutex
- make the result_queue a locking queue (blocking is only done in the
pop() anyway, and this isn't used in the thread at all)
- don't disallow thread cancelling in the request_queue's pop(), which
is the only cancellation point in this thread