1
0
Fork 0
Commit graph

8690 commits

Author SHA1 Message Date
Torsten Dreyer
f68ae55068 Don't return invalid JSON if node not found 2014-03-25 21:43:08 +01:00
Colin Douglas Howell
aa27b38666 Fix for issue 1423 (YASim miscomputes force vector on Surfaces with nonzero incidence)
Surface::calcForce() now does reverse incidence rotation of force vector properly.
2014-03-25 01:50:21 -07:00
Torsten Dreyer
e7dec994b8 httpd: provide more airport information in geojson
- provide runways as polygon geometry
- provide longest runway lenght, heading and surface type
- some code cleanup
2014-03-23 21:19:04 +01:00
Torsten Dreyer
2c3d779459 Add virtual destructor 2014-03-23 21:17:54 +01:00
James Turner
9847bf3d13 Fix for bug 1419, nav.dat runway binding
Clean runway names to standard structure (0-prefix) before looking up
in the cache, when binding ILS navs to runways.

https://code.google.com/p/flightgear-bugs/issues/detail?id=1419
2014-03-23 09:53:00 +00:00
Colin Douglas Howell
8a9ce0ccf7 Fix for issue 1400 (YASim slats always give full stall enhancement)
Surface::stallFunc() now scales _slatAlpha by _slatPos when adjusting stallAlpha.
2014-03-22 12:11:39 -07:00
Torsten Dreyer
527eb9d444 httpd navdb: report ils/loc as geojson multilinestring 2014-03-21 13:00:59 +01:00
Thomas Geymayer
58c01b112e Canvas: update for 'file'->'src' rename 2014-03-20 11:43:12 +01:00
Torsten Dreyer
d59c57717e Don't allow call with no Filter set. Leads to crash. 2014-03-19 17:24:52 +01:00
Torsten Dreyer
3d33aff7bc Add a http handler to access the nav database
see the browsermap for an example
2014-03-19 17:23:53 +01:00
Thomas Geymayer
f0ef2b9576 Expose HTTP client to Canvas. 2014-03-18 18:35:35 +01:00
Torsten Dreyer
efcc89480d httpd: don't spam the console with debug messages 2014-03-17 16:38:53 +01:00
Torsten Dreyer
1867ccb4a8 httpd: better handling of first-time notifications
ensure new listeners get notified on first update loop
also cleanup the PropertyChangeObserver on reset
2014-03-17 16:22:42 +01:00
James Turner
070dba29f9 Close dialogs on GUI shutdown
- avoids orphaned dialogs on reset
- requires some guards in NasalSys since Nasal is shutdown first, but
  dialogs can have Nasal modules.
2014-03-16 22:52:55 +00:00
James Turner
849c6ccc6e GPS fixes
- fix corrupted ident on Mac (libc++ issue)
- don't clear scratch when activating DTO mode
- use the real navaid/airport for the waypt where possible
- expose active waypt name
2014-03-16 16:20:03 +00:00
Thomas Geymayer
764fbd519c CanvasWidget (PUI): make button index consistent with Canvas windows 2014-03-15 15:01:09 +01:00
Torsten Dreyer
a830708252 PropertyChangeWebsocket: fire change after subscribe 2014-03-14 21:36:29 +01:00
Torsten Dreyer
95d4c5898d httpd: handle url-rewrites 2014-03-14 16:39:16 +01:00
Torsten Dreyer
75933d3e1e add min/max freq to the frequencyformatter 2014-03-14 15:19:23 +01:00
James Turner
7041ed9078 Fix compilation with SYSTEM_SQLITE 2014-03-13 18:19:13 +00:00
James Turner
487546c848 Fix some leaks on reset
- tilecache 'clear_cache' is poorly named, ensure the destructor
  really deletes all outstanding entries.
2014-03-13 18:19:13 +00:00
Torsten Dreyer
aaa7fca621 NasalSys: arg is never null 2014-03-12 22:42:51 +01:00
Torsten Dreyer
7132947d16 httpd: update mongoose and websockets
* mongoose updated to 5.3
* first stab at implementing websockets, here a property change listener
  websocket. This websocket is at ws://yourhost:yourport/PropertyListener
  see FGDATA/Docs/gui/radio.html for an example
2014-03-12 22:39:37 +01:00
Torsten Dreyer
275d2dc7fa Partial fix #1408 2014-03-12 21:21:56 +01:00
James Turner
c7f2992904 Add 'set-scenery-paths' command. 2014-03-12 18:56:19 +00:00
James Turner
56ca1fe93b Don't rebuild navcache for scenery changes
- Cache can drop all ground-nets.
2014-03-12 18:56:18 +00:00
James Turner
c00ab21fad ICAO.ils.xml data works read-only. 2014-03-12 18:56:18 +00:00
James Turner
ffa7854ed9 ICAO.threshold.xml works read-only. 2014-03-12 18:56:18 +00:00
James Turner
5f9c17bd69 ICAO.twr.xml works in read-only mode. 2014-03-12 09:50:39 +00:00
James Turner
afe02b9b36 Reset: tweak property PRESERVE
- ensure options are re-processed before restoring PRESERVEd
properties, so that sessions changes survive a reset.
2014-03-11 22:43:25 +00:00
James Turner
f2a3090384 Fix some Clang warnings. 2014-03-11 16:46:00 +00:00
James Turner
1edffd1d10 Reset: fix OSG stats handling 2014-03-11 16:45:47 +00:00
James Turner
f04d5f8758 Reset: work with threaded OSG modes 2014-03-11 16:45:31 +00:00
Torsten Dreyer
64c393d022 http property browser: don't crash on invalid nodes
Don't expect users to always pass valid node names
or paths
2014-03-10 23:40:42 +01:00
Torsten Dreyer
7c2ce9acf7 allow binding of arguments for fg-commands thru run.cgi
to run a fg-command with args, POST run.cgi?value=my-command
and post the args node as JSON content like this:
{
   name: '',
   children: [
     {
       name: 'property',
       index: 0,
       value: 'first-value is here'
     },
     {
       name: 'property',
       index: 1,
       value: 'first-value is here'
     }
   ]
}
or whatever arguments the requested command takes
2014-03-10 22:58:52 +01:00
James Turner
f07771f3d5 Fix a crash after reset. 2014-03-10 17:43:15 +00:00
James Turner
cc607ae7e4 Save/restore initial state removed. 2014-03-10 17:29:28 +00:00
James Turner
9489009570 Fix fg-aircraft, fg-scenery props after reset.
- restore fg-aircraft properties, and PRESERVE fg-scenery ones,
across reset.
2014-03-10 17:24:42 +00:00
James Turner
03aa642155 Old reset code-path is removed. 2014-03-10 17:24:37 +00:00
James Turner
5e6c2b8e82 Reset the Autopilot on reposition.
- previously we restored AP state to initial; let's
actually re-init it after re-position.
2014-03-10 12:02:10 +00:00
James Turner
a8fe586e48 Revert wiping of /fdm on reposition.
This is too destructive for many established things, so revert it.
Instead, make the FDM shell save /fdm state on postinit(), and
restore it on re-init (which reposition invokes).
2014-03-10 12:00:51 +00:00
James Turner
7b2d710cd0 Add hts_engine 1.08 and flite_hts 1.05 code.
- Not compiled by default, nor hooked up to anything yet.
- Both libraries licensed under modified BSD license.
- Added top-level CMake file for both, to create a plain static
  library for each.
2014-03-10 09:32:43 +00:00
Torsten Dreyer
dac3b45892 Some fixes for the httpd
- Set encoding of the property browser to utf-8
- add the properties index to the json
2014-03-08 14:47:13 +01:00
Torsten Dreyer
ed8ec8f092 JSON: make the response configurable, set encoding
add request parameter 'i' and 'd'
if i=y, indent the output to make it human readable
if i is missing or anything else, send the output unformatted to save bandwith

'd' defines recursion depth with a default of 1 to show the requested node
and the immediate childs (if it has any)

call /json/?i=y&d=999 for a complete property tree backup (use with caution!)

Also set the encoding to UTF-8 as required per RFC 4627
2014-03-07 21:58:33 +01:00
Thomas Geymayer
ef3f0a2738 Canvas.MouseEvent: fix specific modifier states (ctrl, alt,...) 2014-03-07 16:19:40 +01:00
James Turner
86ba2a1628 Throw the reset switch.
- fix up CanvasMgr so canvas works after new reset.
2014-03-07 12:40:14 +00:00
James Turner
5ce2a067ca Fix JSBsim trimming on reposition.
- remove the entire /fdm tree on reposition
- force the initial NED wind values to 0.0 in JSBsim,
pending advice from people who know better.
2014-03-06 22:33:42 +00:00
Torsten Dreyer
b84026ce84 httpd: fix ignored port on --httpd=nnnn
also fix unconditional startup of the daemon
2014-03-06 21:19:49 +01:00
Torsten Dreyer
7602089460 Use the short xml name for properties in JSON 2014-03-06 18:00:11 +01:00
Torsten Dreyer
63e9cbed40 Initial commit for mongoose httpd 2014-03-06 13:19:15 +01:00
James Turner
2beb0f29af Fix starting on carrier.
- scenery intersection needs to check the whole scene since carriers
are outside it. (could possibly be optimised further)
2014-03-06 09:21:04 +00:00
Thomas Geymayer
88b7d4f530 Update for SGPropertyNode changes. 2014-03-06 00:41:41 +01:00
Anders Gidenstam
4a5dce9f48 Added support for shared JSBSim engine and system configurations in fgdata.
Adds $FG_ROOT/Aircraft/Generic/JSBSim/{Engines,Systems} to the JSBSim
engines and system search paths. Internally JSBSim already searches
$aircraft_dir/Engines and $aircraft_dir/Systems.
A file in $aircraft_dir/{Engines,Systems} have higher priority than one
in the shared directories.
2014-03-05 22:41:34 +01:00
James Turner
6493975913 Remove reference to 'old ATIS' from reposition. 2014-03-05 15:16:07 +00:00
James Turner
41567d8fc8 Toggle cloud drawing on/off 2014-03-05 14:22:27 +00:00
Torsten Dreyer
ea13c0f2de Cleanup, no functional change 2014-03-05 14:09:40 +01:00
Torsten Dreyer
c068049d84 NewAtis: handle varying winds 2014-03-05 13:52:43 +01:00
Philosopher
6870a88696 Fix for issue #999
Introduces delay-sec and release-delay-sec properties. The former is how
long to wait to run the binding(s) after pressing the button, the latter
is how long to wait after releasing the button. interval-sec now
specifies the delay before a repeat event occurs.
2014-03-05 00:33:45 +01:00
Thomas Geymayer
36f7ef93aa Canvas.MouseEvent: expose button/modifier state. 2014-03-04 18:00:57 +01:00
Thomas Geymayer
c7c9fd67aa TACAN: fix distance calculations and some other problems.
- Calculate line of sight distance instead of distance over
   ground
 - Do a nav cache update if carrier_nav.dat.gz timestamp has
   changed
 - Allow comments in carrier_nav.dat.gz
 - "Fix" range calculations (still does not take terrain/weather
   and other influences into account)
2014-03-02 16:52:00 +01:00
Thomas Geymayer
5151f7f5e0 TACAN improvements.
- Make search interval for new mobile tacan larger.
 - Continuous update of mobile tacan position.
2014-03-02 01:34:04 +01:00
Thomas Geymayer
234e2bdf09 TACAN/mobile navaid cleanup and improvements. 2014-03-01 20:19:06 +01:00
Torsten Dreyer
090207155e ATIS: say wind direction as three digits 2014-03-01 20:15:52 +01:00
Torsten Dreyer
0c7f21a259 New ATIS System: Fallback for no-realwx and some fixes
Added the fallback for realweather fetch disabled, creating
ATIS from present weather
Fixed some formatting errors, mainly missing spaces
Some code cleanup
2014-03-01 12:44:01 +01:00
Torsten Dreyer
5e080c1e37 Fix wrong metar assignment in commradio 2014-02-28 22:36:29 +01:00
Thomas Geymayer
e34d97796c TACAN: fix receiving mobile TACAN. 2014-02-28 20:01:09 +01:00
Thomas Geymayer
de38157916 FGPUIDialog: fix reading from already free'd memory.
Calls to updateValues can cause nested calls invalidating
the char* passed as argument, if retrieved from a
SGPropertyNode.
Probably SGPropertyNode should also be modified to return
a std::string instead of a pointer to an internal buffer.
2014-02-28 17:34:41 +01:00
Torsten Dreyer
dd6cccdda1 A new comm radio and atis implementation 2014-02-28 11:45:49 +01:00
Torsten Dreyer
c519b9262d Add simple breadcrumb navigation to the httpd 2014-02-27 22:21:45 +01:00
Thomas Geymayer
831f75a030 Autopilot: fix wrong warning for unknown node 2014-02-27 00:20:06 +01:00
Torsten Dreyer
c152e7f118 Bind the CAVOK flag to metarproperties 2014-02-25 09:42:00 +01:00
Thomas Geymayer
f1e0206f30 Autopilot: fix configuration to prevent false warnings. 2014-02-24 23:19:50 +01:00
James Turner
99fd9513d9 Metar: finalise-position fast if Metar fails
- when METAR lookup fails (as opposed to timing out), report
this immediately so finalise-position doesn't wait.
2014-02-24 19:43:21 +00:00
James Turner
bd8e43c007 Initial work on 'reposition' command
- use old-style reset as the basis for a lightweight 'reposition' command. This does not restore state, or reset
time management, but does reset the FDM and re-finalize position.
2014-02-24 19:43:21 +00:00
James Turner
072adde9a6 Remove all references to an alpha-buffer
- Current 3D clouds rendering does not use the alpha buffer,
so don't request one at launch, since it consumes valuable GPU memory.

- Remove any references to alpha testing or alpha func in the renderer setup.
2014-02-24 19:43:21 +00:00
James Turner
a6219dab76 use an osg::Switch to control scenery rendering
- restores functionality of 'draw-otw' property

- adds new /sim/rendering/draw-mask branch to allow control
over rendering each branch inside FGScenery
2014-02-24 19:43:21 +00:00
James Turner
874a923096 Remove legacy reference to draw-otw 2014-02-24 19:43:20 +00:00
James Turner
d035fdf3a9 Optimise NavCache airport query
- makes initial showing of 'Select Airport' dialog faster
2014-02-24 19:43:20 +00:00
James Turner
876e81edbd AIModels use PagedLOD
- allows AIModels to be unloaded by the Pager
- move AI models into the 'models' sub-branch of FGScenery
2014-02-24 19:43:20 +00:00
James Turner
33b7e3e32e Fix an (unlikely) startup crash
Encountered this by accidentally clicking during startup
2014-02-24 11:41:04 +00:00
James Turner
130f581b18 Tile-manager can request VBOs.
Monitor /sim/rendering/use-vbos and pass the value into
our SGReaderWriterOptions.
2014-02-21 08:52:07 -08:00
James Turner
b76d255d82 Remove pre-OSG 'enable/disable-textures' option.
These have been non-functional for a long time, remove
to avoid further confusion.
2014-02-21 07:57:35 -08:00
James Turner
b0dcb657e7 Fix for bug 1304 - crash loading XML route
If the XML is malformed (missing <route> section), don't crash.

https://code.google.com/p/flightgear-bugs/issues/detail?id=1304
2014-02-21 07:57:35 -08:00
Torsten Dreyer
16869d0362 publish the metar date/time to metarproperties 2014-02-21 16:23:10 +01:00
James Turner
0473607731 Tweak tile-manager SGBucket API
* FG builds with 'NO_DEPRECATED_API' in SGBucket
2014-02-19 14:02:09 -08:00
James Turner
39d1b6db38 Re-factor the FPE handling code
* make --enable-fpe work on Linux and MSVC
* standardise the code paths for different platforms
* add an argument finding helper to Options

(This is a basic cleanup, contributions from people with
more experience in this area are welcome)
2014-02-19 13:53:52 -08:00
James Turner
34ed79e5f8 getprop/setprop allows integer indices.
As suggested by a long-standing enhancement idea,
extend getprop/setprop to accept multiple args,
including integer arguments. This removes the need
for string concatenation (and hence, allocation)
on the Nasal side.

Patch by Nicholas 'Philosopher' Scheel
2014-02-18 20:07:29 -08:00
Christian Schmitt
9d995907db Support helipad names in the --runway startup option
also give better user feedback if runway/helipad ID is unknown
2014-02-14 20:05:11 +01:00
James Turner
7bc7197f6a Use Cmake to generate app-bundle on Mac
- build the .plist using CMake features
- update the nightly Mac packaging script for the new layout
2014-02-14 18:58:36 +00:00
James Turner
826ea8139f Re-apply the Clang/C+11 fix for JSBSim
Hopefully an equivalent change will occur upstream before the next
JSBsim sync.
2014-02-14 17:42:50 +00:00
James Turner
239a000763 Use new SGBucket API in tile-manager
- check for invalid tiles / buckets, which occurs at the poles
- use .sibling() method to offset
- no longer need to store view lat/lon in the manager.
2014-02-13 18:52:52 +00:00
Thomas Geymayer
e600cd3d00 Autopilot: add interface properties and property-root.
- Support interface properties as with JSBSim for easy reuse
   and parametrization of autopilot components.
 - Add property-root property to allow changing property root
   for all relative paths. This allows easy use of multiple
   instances of the same autopilot component at the same time
   by specifiying different property root nodes.
2014-02-09 18:51:09 +01:00
Thomas Geymayer
4ae8cd99a1 XMLAutopilot: cleanup and remove code already available in SGSubsystemGroup. 2014-02-09 18:50:55 +01:00
Thomas Geymayer
3b23892ccf Canvas: also apply matrix of element to getTransformedBounds.
Part of the fix for #1333.
2014-02-08 00:28:24 +01:00
Christian Schmitt
7e8ee5a3a8 fix another crash at the poles 2014-02-07 23:29:06 +01:00
Christian Schmitt
6cadc2cf40 Simplify some SGGeod-related calculations 2014-02-05 23:07:43 +01:00
Christian Schmitt
ae8ddd04d9 [AIModel] Fix a crash when starting at the poles and reduce property reading 2014-02-05 17:51:28 +01:00
Curtis L. Olson
a92c697989 I'm doing battle with git ... this should have already been committed with an
explanatory commit log message.  If not ... sorry ... grrr ... git.
2014-02-05 10:15:36 -06:00
Curtis L. Olson
d306e94c1c Add an 'overrideRedirect' flag to the window configuration section. For
multi-headed Gnome based linux systems, this provides an extra hint that we
really wish to open up our full screen window spanning all physical displays.
This works around a kink in the gnome window manager where it tries to "lie"
to applications about the full screen size assuming most applications don't
wish their windows to span multiple physical displays.
2014-02-05 10:04:18 -06:00
James Turner
27c58ddb21 Tacan: avoid a 'long-range' wgs84_inverse
- Only check mobile distance at all, if the mobile is valid
2014-02-04 14:54:39 +00:00
James Turner
34433c1fa1 GPS: fix bad init when far from any airport 2014-02-04 14:53:42 +00:00
Clément de l'Hamaide
d9e8abcc99 FGCom: change default silence threshold 2014-02-04 12:18:50 +01:00
Christian Schmitt
a0184ac80c MapWidget: silence compiler warning 2014-02-02 16:47:25 +01:00
Clément de l'Hamaide
43b8d157ce Send transponder mode over network 2014-01-29 21:04:58 +01:00
Erik Hofman
73a519a95c Make the JSBSim terrain handling code compile time configurable by calling cmake -DJSBSIM_TERRAIN=1 2014-01-29 13:50:06 +01:00
Erik Hofman
7bdd1d617d Integrate the latest terrain handling code 2014-01-29 13:45:19 +01:00
James Turner
b7a9aee796 FGViewer fixes
- ensure active material are cached
 - clear osgDB object cache on exit explicitly
2014-01-29 10:10:53 +00:00
Thomas Geymayer
61da998e02 Expose SGPath::standardLocation to Nasal. 2014-01-28 01:08:06 +01:00
James Turner
4df9c61d2a Check for and warn about old nVidia drivers.
(Had a bug report with someone using 189 drivers on Windows!)
2014-01-27 17:27:12 +00:00
James Turner
1a372d9366 Update image-server logic.
- no dependency on libJpeg or Simgear
- no duplicate rendering of the scene (uses a draw callback)
- supports other image types, eg PNG
- threaded so doesn't block the main loop ever
2014-01-27 09:08:34 +00:00
James Turner
9f3a2ddbdc Change default Windows terrasync path
Now use (new) SGPath::documents helper to download
to a user-visible location: Document\FlightGear.
(Linux & Mac behaviour is unchanged)
2014-01-26 16:07:53 +00:00
Clément de l'Hamaide
3254f54f9e FGCom: add silence threshold setting
Require commit 1396848dcf31d181ab740c8eb728cff02f06fd3d from fgdata
2014-01-26 16:38:48 +01:00
Rebecca Palmer
6adb8b22df Fix compilation with SYSTEM_SQLITE, from Markus Wanner
Fix error "no known conversion for argument 1 from ‘sqlite3_int64
{aka long long int}’ to ‘PositionedID& {aka long int&}’"
(Both those types are int64, but that evidently isn't enough)
2014-01-26 10:34:49 +00:00
James Turner
c8b1655edc Report bad command-line args via message box.
This makes the behaviour when FGRun (or other GUI launchers)
send bad options much more explicable. Non Windows/Mac systems
get an SG_ALERT on the console as before.
2014-01-25 10:36:00 +00:00
James Turner
64cbc06003 clang / libc++ fixes for JSBSim
(needs to be upstreamed too)
2014-01-25 10:34:19 +00:00
James Turner
2a1e33863a Search all resources when adding models at runtime.
geo.put-model / add-model mechanism now supports resolving paths
using all the defined locations, including aircraft dirs and
additional data dirs,
2014-01-23 15:02:33 +00:00
James Turner
c6541e9c8f Remove some debug log calls.
All places which continuously log messages (either every frame or at
least every second) tending to swamp other log output.
2014-01-23 13:49:58 +00:00
James Turner
45d67406a4 CrashRpt tweaks, checking.
- show a message box if setup fails
- log setup status
2014-01-22 22:33:30 +00:00
James Turner
80cc2ff8c3 Adjust fg-aircraft handling back to original style.
- startup code will warn and fix the alternate style
- man page now documents the option
2014-01-22 10:56:04 +00:00
Clément de l'Hamaide
695a9be75d Use --fg-aircraft paths for AI model
Firstly search model in $fg-root/AI/ path,
if not found, search model in --fg-aircraft paths,
if not found, search model in $fg-root/Aircraft path

This commit should solve the complaint "I have an aircraft in a separate Aircraft/ folder
but during MP session other user are shown with the aircraft from the $fg-root/Aircraft path
instead of this behaviour I want to see the aircraft from my separate Aircraft/ folder"
2014-01-21 00:13:17 +01:00
James Turner
a46114da9a Fix typo, add Hudson Build-ID to reports. 2014-01-20 21:54:06 +00:00
James Turner
1b585fa415 Windows native file-dialog, menu-bar
By Gijs with additions by James. Menubar is disabled at present
since it's not usable and potentially inferior to other solutions,
but committing the code so it doesn't rot.
2014-01-20 18:43:02 +00:00
James Turner
ce3a7b20fe Crash-fix: mat-lib is now reference-counted.
Adapt to corresponding SG change to make SGMaterialLib be ref-counted,
and have the 'reload-materials' command notify the tile-manager of this,
so it can update the options struct it passes to new tiles.
2014-01-19 16:49:44 +00:00
James Turner
2df74c9b63 Silence some clang warnings.
(Unused private variables)
2014-01-19 16:49:43 +00:00
Erik Hofman
fe79be0702 Do not use the new JSBSim ground reactions code by default until there is a good way to identify Nasal scripts that do this themselves 2014-01-19 15:23:15 +01:00
James Turner
49a0398fc6 Make lifetime of CameraViewportListener explicit.
MSVC is warning on this usage, as is the Mac release build. Working
around the issue for the moment.
2014-01-18 18:49:03 +00:00
James Turner
2a460d8e86 Make CrashRpt link optional
(The variable contains -NOTFOUND, not the empty string, so we can't
just link against it regardless)
2014-01-18 15:36:20 +00:00
James Turner
590be3f8ff Initial integration of CrashRpt for Windows. 2014-01-18 14:51:19 +00:00
Erik Hofman
e3e44e49ee Sync. with JSBSim CVS: although it looks a large part it is mostly bug fixes and fixing compiler warnings 2014-01-18 10:56:15 +01:00
James Turner
f98af7eb35 Fix un-initialized memory read. 2014-01-17 17:17:47 +00:00
Clément de l'Hamaide
c0c8158ca1 FGCom: force 8.33KHz to be handled even if the frequency doesn't exist 2014-01-16 18:15:58 +01:00
James Turner
2a354e224c Make Traffic-via-terrasync conditional
GUI dialog already set the property, just need to pick it up.
2014-01-15 22:01:02 +00:00
James Turner
5e7574c9c2 Bug-fix: Cocoa menus work in aircraft with custom dialogs.
Restarting the GUI could cause Cocoa menus to misbehave, due to
destruction behaviour of SGBinding. Use new clear() helper in the
short term to work around this.
2014-01-15 22:00:09 +00:00
James Turner
2b55acd3eb Tweaks to fg-aircraft handling.
Warn (but do not require, since people would probably complain) when
added paths do not contain an Aircraft subdir. When people specify
a path which ends in /Aircraft, use the parent directory.
2014-01-15 17:10:12 +00:00
James Turner
d8a3f160ef Bugfix: guard against corrupted airport XML. 2014-01-14 13:42:11 +00:00
James Turner
1b9394fc37 Crashfix: move spatial, AI queries in map-widget
In threaded OSG drawing, MapWidget::draw runs in the render
thread context, but touches lots of main thread state. Move most of the
work to an update() helper run on the main thread instead, so draw()
mostly makes pure GL calls.

(This is a fix for 3.0, the real solution is to migrate to a
Canvas-based map and GUI)
2014-01-14 13:11:06 +00:00
James Turner
976f3115a9 GPS bug fix: restore startup mode.
- the 'default to current airport' behaviour got broken by the
changes to the scratch. 
- expose a 'valid' flag on WP1
2014-01-14 13:04:52 +00:00
James Turner
9993e0a588 Fix bug 1286 - mouse scroll-wheel+shift ignored
On Mac, the OS is mapping shift+wheel to horizontal scrolling for
those of us without a mighty-mouse or trackpad. Detect this case
and map back to vertical scrolling inside FlightGear for the moment.

https://code.google.com/p/flightgear-bugs/issues/detail?id=1286
2014-01-13 21:08:32 +00:00
James Turner
061154d7a6 Reset, fix Nasal timers added on shutdown. 2014-01-13 20:13:34 +00:00
James Turner
4d0eeb8184 Reset work, fix time-slew on OSG event handling. 2014-01-13 20:13:34 +00:00
Clément de l'Hamaide
606643a199 FGCom: update special_frq for built-in/standalone sync 2014-01-12 21:17:57 +01:00
James Turner
7316360421 Clear the custom OSG notify logger on shutdown.
Should avert crashes due to order of static destruction.
2014-01-12 17:18:35 +00:00
James Turner
7b8a64b614 Crash fix: thread-safe material conditions
When tiles are being loaded, re-evaluate the materials cache once
per update cycle. (This is probably too often, but no worse than the
previous approach).
2014-01-06 08:28:40 +00:00
James Turner
448539a6b9 Fix crash: Quit via Cmd-Q on Mac.
Tweak static-init order of some OSG objects, so they are valid when
fg_terminate runs, and hence orderly shutdown in possible.
2014-01-04 17:27:55 +00:00
James Turner
9e773e85f8 #1291, hang on exit with OSG threading.
Explicitly stop threading during shutdown, before destroying various
rendering / viewer related structures.
2014-01-04 16:10:42 +00:00
James Turner
580a7f07dd Fix METAR-download bug on Windows.
https://code.google.com/p/flightgear-bugs/issues/detail?id=1207

Use the new (in SimGear) sgGMTime helper when comparing METAR age.
This prevents users in time-zones 4 or more hours ahead of GMT from
being unable to use METAR reports.
2014-01-01 21:05:29 +00:00
James Turner
47e802e674 Fix for the fix: check for a viewer.
- avoid a crash if we bail out before creating the viewer (missing
data or bad aircraft)
2013-12-30 17:16:53 +00:00
James Turner
b0db2a764f Fix crash on exit (cancel the osgDB pager)
- borrow some code from the new reset codepath to cleanly stop the
OSG pager thread during normal shutdown. Avoids a race-condition 
destroying various structures the pager thread might be modifying.
2013-12-30 15:24:15 +00:00
Thomas Geymayer
5b537b6999 PID: ensure correct initialization with large sampling interval 2013-12-22 14:18:25 +01:00
James Turner
0940a33907 Use a real function to wrap isfinite differences.
Don't worry about compiler ability to inline the macro for the moment;
use a real function to ensure lookup is stable on different compilers.
2013-12-22 11:18:48 +00:00