1
0
Fork 0
Commit graph

10868 commits

Author SHA1 Message Date
Thomas Geymayer
16d73f4012 Canvas: Redraw if OpenVG has been initialized.
If OpenVG/ShivaVG is initialized nothing is drawn in the same
frame, therefore we need to draw another frame to ensure all
paths are rendered correctly.
2012-09-25 21:34:58 +02:00
James Turner
a10638c6b4 Use a helper thread to rebuild the navcache.
Avoid the application becoming unresponsive during nav-cache rebuilds. We still have to wait for the rebuild, but perform it on a helper thread so the main GUI thread stays responsive and hence doesn't trigger a beach-ball / 'not responding' alert. Also ensures there's some feedback (the spinner) during the rebuild operation, so users don't think we've hung.
2012-09-25 17:24:12 +01:00
James Turner
ae6218ff10 Restore named JS/input configs (overrides)
Thanks to jano for pointing out I'd broken this feature!
2012-09-25 14:20:18 +01:00
James Turner
8050f39089 Fix linux build, needs explicit <cstring> 2012-09-25 10:29:32 +01:00
James Turner
9426928cdf Fix a typo. 2012-09-25 10:07:11 +01:00
James Turner
649d579124 Helpers to access view position.
Avoid direct use of FGViewer in various places, by providing property-based accessors to the current view position.
2012-09-25 10:06:56 +01:00
James Turner
4456f42e67 Make the view-manager and sound-manager independent.
Use properties to pass current-view information to the sound-manager, so there is no hard-coded dependency between the subsystems.
2012-09-25 09:17:00 +01:00
James Turner
4ea5a0c31d Whoops, parking refactoring changed the positioned types.
Force a nav-cache rebuild to accommodate the renumbered types.
2012-09-25 09:15:36 +01:00
James Turner
2f6172687e Make FGControls behave like a standard subsystem. 2012-09-25 00:48:48 +01:00
James Turner
b1ff365a8f Make FGTaxiNode and FGParking inherit FGPositioned.
In preparation for caching the groundnet in the NavCache, make taxi-nodes and parkings inherit from FGPositioned. As part of this, make them heap (as opposed to value) classes, disable their copy-constructors, remove many mutating operations, and give them real constructors.
2012-09-25 00:31:17 +01:00
ThorstenB
a2cfef95fb Minor tile manager clean-up.
The tilemgr schedules scenery, so it should also trigger the
"sceneryloaded" signals once it's done.
2012-09-24 23:42:25 +02:00
James Turner
fd99e9fdfb std namespace fixes in headers. 2012-09-24 08:39:30 +01:00
James Turner
59f6f330c2 Defer SGEphemeris creation until ::init()
Trying to make subsystem *creation* cheap - major work such as IO should be deferred until init() where possible.
2012-09-24 00:37:46 +01:00
James Turner
fb266722ba Parking: another segfault edge-case.
Again, when there's no parking/ground-net, tolerate this.
2012-09-24 00:36:47 +01:00
James Turner
6c6452c62b Adapt to revised SGTime API
Convert SGTime users to pass SGGeod/SGPath instead of raw values.
2012-09-24 00:03:23 +01:00
James Turner
66a6438de1 Avoid a segfault-on-null
This code is called both when there's no ground-net, but also when there's no parking data at all.
2012-09-23 23:07:00 +01:00
James Turner
b1854459b3 Clean up dynamics/parking handing code.
Refactor some parking / airport-dynamics APIs, in preparation for caching the ground cache data in the nav-cache.
2012-09-23 21:42:40 +01:00
James Turner
01be5529ba Commands to bind metar to the property tree.
New commands request-metar and clear-metar will bind metar reports to an arbitrary property tree path. E.g:

fgcommand("request-metar", var n = props.Node.new({ "path": "/foo/mymetar", "station":"LOWI"}));
2012-09-23 16:55:29 +01:00
Thomas Geymayer
efe978e679 Canvas: Fix detection if something has changed
- Reset dirty flag for redrawing canvas properly after
   rendering has complted.
 - Update path properly if path elements have been removed.
2012-09-23 17:31:12 +02:00
ThorstenB
293d6b3565 Fix compilation with enabled EVENT_INPUT
Need to move the definition to the toplevel cmake file, since sources
are no longer compiled on directory level (individual libs per dir).
2012-09-22 14:23:15 +02:00
ThorstenB
0f3fecf0c6 Fix NavDisplay segfault
When "addSymbolInstance" returns NULL, we cannot update "ins->endPos".
2012-09-22 14:23:15 +02:00
ThorstenB
acb7fb8e95 Fix shared library build with sqlite
Dependency to threading lib is required (It is already provided for
static SimGear).
2012-09-22 14:23:14 +02:00
Thomas Geymayer
0f850312ea Canvas: Support for pseudo non-zero fillrule 2012-09-21 22:03:58 +02:00
Thomas Geymayer
4a94071ed7 Canvas: Performance improvements.
- Only render the canvas if something has actually changed
   (Currently checked by looking for modified properties).
 - Only write bounding box to property tree if it has been
   recalculated (until now this happened every frame).
2012-09-21 22:03:58 +02:00
ThorstenB
88592bfe71 splash screen: use language resource for translation
Also pimp the progress spinner.
2012-09-21 19:36:25 +02:00
ThorstenB
db3c70e235 Improve readability. 2012-09-21 16:44:16 +02:00
ThorstenB
002cada172 gyro heading indicator: realism when spin is low
Low spin or switched off gyros result in the indicator being stuck.
When the gyros are repowered, the indication doesn't jump to the correct
indication, but keeps the current error.
2012-09-21 15:59:04 +02:00
ThorstenB
2003e7cf2a Avoid compiler warning. 2012-09-21 15:36:52 +02:00
ThorstenB
9d08cfc24a Sound Manager: support subsystem reinit
instead of using property listener.
Also moved run-time init to standard init phase.
2012-09-21 15:33:13 +02:00
ThorstenB
05e9172220 Avoid AL warning messages when using "--show-sound-devices". 2012-09-21 15:33:13 +02:00
ThorstenB
9968888e45 FGProps: improve error messages
Lowlevel "simgear:NetChannel" only returns status infos, but doesn't
output log messages itself.
2012-09-21 15:33:13 +02:00
James Turner
d7d19649aa Fix a stupid logic bug when re-ordering waypoints.
http://code.google.com/p/flightgear-bugs/issues/detail?id=870
2012-09-21 12:47:51 +01:00
James Turner
d56ac505c4 Linux needs explicit <cstring> include. 2012-09-21 11:34:28 +01:00
James Turner
6e7ac46751 Cached joystick config loading.
Avoid parsing all the joystick configs every launch.
2012-09-21 10:17:16 +01:00
James Turner
666a68c742 Lazy GUI dialog loading, for slightly faster startup. 2012-09-21 10:16:44 +01:00
Thomas Geymayer
f0927fc06d Canvas: Change default fill-rule to nonzero 2012-09-21 00:42:21 +02:00
Stuart Buchanan
a3a40af860 Simplify code for taxiways. 2012-09-20 21:53:31 +01:00
Stuart Buchanan
ac1fc699b7 Expose surface types and taxiways via the airportinfo() Nasal call. 2012-09-19 22:33:43 +01:00
ThorstenB
f8b689c040 Allow instruments/systems to reset on sim reset
so they can instantly adjust to the changed environment.
(Not fully working yet, since some environment settings, like environemnt
pressure/temperature, still changes slowly after a sim reset - instead of
immediately jumping to the new setting. Also, METAR sometimes arrives too
late...).
2012-09-19 20:57:52 +02:00
ThorstenB
a68716316f Adjust subsystem order (instruments vs systems)
"instruments" depend on "systems" (pitot/static pressure etc), so
"systems" should be there first.
2012-09-19 20:53:54 +02:00
ThorstenB
f6207d5cb8 Minor renaming issue. 2012-09-19 20:52:36 +02:00
James Turner
3cf7715485 Expose the route-path of leg to Nasal.
In advance of converting the Map and NavDisplay to use the canvas, expose the full route-path vector for each flight plan leg, as a vector on the leg. Use leg.path() to get this.

E.g.:

var fp = flightplan();
for (var i=0; i<fp.getPlanSize(); i += 1)
{
  var leg = fp.getWP(i);
  debug.dump(leg.path());
}
2012-09-19 18:40:34 +01:00
James Turner
029012b8b9 Kill off some globals.
Break some subsystem dependencies, by explicitly using properties to read the primary position, orientation and velocities. (Instead of directly accessing the primary model placement). This means a couple more globals can die.
2012-09-19 18:17:44 +01:00
James Turner
32248bf576 Support string-list properties in the cache.
Not used yet, but will aid in caching joystick and dialog configs.
2012-09-19 18:15:49 +01:00
James Turner
c9351e0185 Whoops, some code got re-introduced.
Merging/rebase the navcache re-added this code to fg_init.cxx, remove it again.
2012-09-19 15:56:23 +01:00
James Turner
f7878cfd4d Fix a Clang warning in Shiva. 2012-09-19 15:55:49 +01:00
James Turner
50c61b4211 Allow use of the system's SQLite3 library.
Keep distro packagers happy by having the option to use the system's sqlite library instead of our bundled version. Set SYSTEM_SQLITE=1 when running cmake to use the system one.
2012-09-19 14:28:25 +01:00
James Turner
9b900e9430 Implement a persistent cache for navigation data.
Cache the parsed navigation and airport data in a binary file to reduce
startup times and memory consumption (since only referenced FGPositioned
elements are held in memory).

Data will be reimported when the mod-time of any input file is changed.
If a global file is changed (nav.dat, awy.dat, apt.dat, etc), the cache
will be completely rebuilt, which takes approximately 30 seconds on
moderate hardware. (Future work may reduce this).
2012-09-19 11:38:19 +01:00
James Turner
48c26079e1 Fix classes derived from SubsystemGroup.
Various classes derive from SubsystemGroup, but extend the init behaviour. Fix those for the incremental init scheme, generally by forcing their init to be atomic. Can convert them to be truly incremental in the future if it's needed, but probably not.
2012-09-19 11:37:19 +01:00
Thomas Geymayer
09ac319e87 Canvas: Don't crash on removing child hierarchie from map
Currently if a SGPropertyNode is removed from the property tree
only for this single node a childRemoved event is triggered. So
if we just check for a specific child to be removed, we will never
be notified. This commit manually triggers the event recursively
for all children but this should probably go directly into simgear.
2012-09-18 23:21:50 +02:00