fredb [Thu, 30 Mar 2006 20:37:34 +0000 (20:37 +0000)]
Don't restore initial screen geometry because there is nothing in fg_os* to resize an existing window.
Old behavior was to just resize the GL viewport, which doesn't necessarily match the fg window size.
curt [Tue, 28 Mar 2006 21:18:32 +0000 (21:18 +0000)]
Marc Frajola:
Here is one patch that to make FlightGear run without floating point
exceptions on FreeBSD. Apparently, if we do not ignore floating point
exceptions per this patch, there is some occasional condition where the
nvidia driver is involved in delivering spurious floating point exceptions
to the fgfs process, causing it to core-dump occasionally without the patch.
With only this patch, FlightGear will compile and run properly on
FreeBSD 6.X as long as the nvidia accelerated driver is installed,
modulo proper switches to the SimGear and FlightGear configure script
executions.
Again, kudos to your team for the great work on the big release
push; it is super to see things come together like this!
durk [Sun, 26 Mar 2006 21:40:35 +0000 (21:40 +0000)]
Bugfix in the ai initialization randomization procedure. Randomly
removing waypoints could cause the AIFlightPlan to run out of waypoints.
This patch prevents that by retaining at least two waypoints.
mfranz [Sat, 25 Mar 2006 08:47:53 +0000 (08:47 +0000)]
- don't crash if user clicked "Apply" but hasn't selected an airport
- re-order information from "LOXT Tulln" to "Tulln (LOXT)".
The list is sorted by airport name and columns aren't aligned, so this
looks way cleaner.
mfranz [Thu, 23 Mar 2006 23:02:48 +0000 (23:02 +0000)]
- set size, otherwise the widget doesn't expand to the size that the layouter
found desirable
- set slider width default correctly (parentHeight? Huh?)
mfranz [Thu, 23 Mar 2006 23:00:31 +0000 (23:00 +0000)]
- implement setSize(): We can't just use puObject::setSize() -- we do, of
course, have to re-layout all sub-widgets on resizing
- make slider size configurable, like it's done for the close relative
puLargeInput
mfranz [Thu, 23 Mar 2006 19:51:38 +0000 (19:51 +0000)]
- abstract out box slider width (should probably be settable)
- reduce it to 20 (30 is excessive and didn't match the property brower look)
- call puSlider with this size explicitly (otherwise its size is derived
from the font size, unlike the arrow buttons!)
mfranz [Thu, 23 Mar 2006 19:03:31 +0000 (19:03 +0000)]
make puList actually useful: call back on list entry selection.
(again: I'll submit all the changes to plib's puaList as soon as
possibe. Just needs a few more fixes first ... :-)
mfranz [Thu, 23 Mar 2006 17:44:10 +0000 (17:44 +0000)]
make puListBox inherit puList colors (otherwise the GUI style isn't
respected, and black text on dark grey is a bit hard to read).
TODO: - submit that for inclusion in plib's puAuxList
- drop custom version and use plib's (after 0.9.10)
ehofman [Wed, 22 Mar 2006 13:32:32 +0000 (13:32 +0000)]
Jon Berndt:
I had inadvertently terminated a data line when reaching a tab character after
initial data was supplied. I tested the lightning file and it now appears to
read in correctly.
mfranz [Wed, 22 Mar 2006 10:56:49 +0000 (10:56 +0000)]
puList.cxx: _list_box->getIntegerValue() returns -1 as long as no list
entry was selected. Return 0 in this case, not an invalid string address
(causing segfaults).
dialogs.cxx: don't set property if no list entry was chosen.
daveluff [Tue, 21 Mar 2006 23:33:54 +0000 (23:33 +0000)]
This innocuous looking typo was crashing the sim whenever an AI plane was asked to follow the user whilst the user was flying a circuit (non straight-in) approach
mfranz [Mon, 20 Mar 2006 12:10:20 +0000 (12:10 +0000)]
extract loop body into separate function to later allow model addition
at runtime; remove Nasal support for now (the model loader is currently
initialized before the Nasal subsystem is available)
durk [Sun, 19 Mar 2006 07:41:48 +0000 (07:41 +0000)]
Bugfixes and feature improvements related to AI auto flightplan generation.
When AIFlightPlanCreateTaxi() function is called with the firstFlight
argument set to true, this is supposed to handle situations where the
the aircraft's timetable indicates it should have left between about 5 to
20 minutes earlier. In the previous version, all these aircraft started
taxiing from the first parking location available in the network, due
to the fact that the variable gateId was not assigned a value. In this
patch, route tracing starts from an assigned gate and the network node
following code is fast forwarded to a random location along the taxiways
to give a more realistic and natural distribution of taxiing aircraft
after startup.
This patch further addresses some weird ballet-dancing behavior that
aircraft were showing just prior to/right after parking and which was
related to a number of more or less duplicate waypoints in the transition
from createTaxi() to createParking() to createPushBack() to createTaxi().
Finally, a blatant typing error in the getParking() function was fixed.
durk [Sat, 11 Mar 2006 18:14:48 +0000 (18:14 +0000)]
Bugfix: Non-existent AIModels could trigger a request to load scenery tiles
at (lon, lat) coordinates -1000,0. This patch fixes the AIModels/Traffic
Manager side of things. The AIModels subsystems allowed the creation of
AIAircraft with non-existent 3D models. If such a model didn't exist, the
aip class didn't get initialized, resulting in the above-mentioned bogus
position information. Here I circumvent this problem by a) only interacting
with the tile loader if the model is visible (and hence has succesfully been
initialized) and b) by disallowing the traffic manager to create AIAircraft
objects if the path to the 3D model doesn't exist.
andy [Fri, 10 Mar 2006 22:21:42 +0000 (22:21 +0000)]
While I had the valgrind rig set up, I took the opportunity to plug a
bunch of memory leaks that had accumulated over the years. FlightGear
doesn't currently bother to destroy and recreate a YASim context, but
at least it can do so now without worry.
andy [Fri, 10 Mar 2006 19:47:23 +0000 (19:47 +0000)]
Fix an uninitialized data condition that crept in during the recent
groundcache addition -- the ground callback doesn't do anything at
solution time, so the ground plane was unset. Valgrind was whining
about this; it's not clear that it was actually causing a problem.
andy [Fri, 10 Mar 2006 19:46:16 +0000 (19:46 +0000)]
When we are asked to produce no force on a Surface (e.g. a weight that
is "off"), make sure the force is actually zero. Kind of a hack -- a
better idea would be flag to set at a higher level.
frohlich [Fri, 10 Mar 2006 07:13:59 +0000 (07:13 +0000)]
We need to flush all pending mouse move events past a mouse warp to avoid
a race condition ending in warping twice and having huge increments for the
second warp.
I am not aware of such a flush function in glut. So we emulate that by
ignoring mouse move events between a warp mouse and the next frame.
That should make glut behavour aequivalent to sdl behavour.
mfranz [Thu, 9 Mar 2006 13:30:28 +0000 (13:30 +0000)]
check if the "nasal" subsystem is still there, and only call <unload> then.
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.
mfranz [Thu, 9 Mar 2006 11:14:16 +0000 (11:14 +0000)]
add <load>/<unload> support to AI models, including aircraft models. For
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.
mfranz [Thu, 9 Mar 2006 09:04:03 +0000 (09:04 +0000)]
NasalSys.[ch]xx:
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.
mfranz [Wed, 8 Mar 2006 16:06:32 +0000 (16:06 +0000)]
crashfix: handleCommand() is called from other modules (input callbacks,
fgcommands from C++ or GUI), so we need a separate context here. (See
also solution in FGNasalListener::valueChanged)
mfranz [Wed, 8 Mar 2006 10:44:46 +0000 (10:44 +0000)]
add support for <nasal> blocks <open> and <close> in XML dialogs:
<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".
mfranz [Tue, 7 Mar 2006 10:26:25 +0000 (10:26 +0000)]
Jean-Yves Lefort: fix "crash" on exit
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.
daveluff [Sun, 5 Mar 2006 16:49:20 +0000 (16:49 +0000)]
Add the MAXNI IAF to the C83 approach, and add a few guards against not finding the fixes in the data. I realise that tweaking a hard-coded approach seems daft when loading approach data from file is high on the TODO, but I'm using C83 as an example for a readme so it may as well match the published chart properly...
fredb [Sat, 4 Mar 2006 20:21:32 +0000 (20:21 +0000)]
Jean-Yves Lefort :
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.