1
0
Fork 0
Commit graph

8226 commits

Author SHA1 Message Date
James Turner
a1031b052d NavDisplay - custom symbol support enabled. 2012-12-24 23:13:18 +00:00
James Turner
e248ea8183 Fix altitudes on default SIDs and approaches.
Thanks to Hyde for noticing I had set the elevations incorrectly.
2012-12-24 20:22:58 +00:00
James Turner
a6dc2beb4d Make PLAN mode in Boeing NDs possible.
Allow the location of the ND centre to be set from properties instead of always using the acct position.
(I thought I'd supported this option long ago, evidently not)
2012-12-24 17:42:23 +00:00
James Turner
41481967f1 Revised cache transaction handling.
Use a RAII object to manage cache transactions, and reset queries immediately after they are done, to avoid auto-commit transactions lasting long periods of time. Re-write the commit and step logic to handle SQLITE_BUSY, with progressively increasing waits when there is DB contention (multiple processes accessing the DB).
2012-12-23 23:32:53 +00:00
James Turner
3c6fbffdf2 Fix a typo. 2012-12-19 10:06:52 +00:00
James Turner
1e8cdd5829 Support partial all-within-range spatial queries.
As an opt-in API, allow clients to request partial results, with a time-bounded cutoff. Use this to keep the MapWidget responsive even when many airports are being added to the cache (e.g., zooming out or panning rapidly when zoomed out)
2012-12-18 10:23:44 +00:00
Thomas Geymayer
e844383988 Expose canvas Text::getNearestCursor to Nasal as replacement for old property based method 2012-12-17 00:32:24 +01:00
Thomas Geymayer
cef12d406c CanvasEvent: expose event target to Nasal 2012-12-17 00:32:24 +01:00
Thomas Geymayer
41d285a821 Canvas: remove old event handling code 2012-12-16 19:04:38 +01:00
James Turner
2905c96f47 METAR selection of runway works for reset.
Explicitly reinit the realwx subsystem on sim-reset, so METAR is updated within the 10-second finalizePosition window.
2012-12-16 15:05:21 +00:00
James Turner
487638be7f Restructure positional finalisation for sim-reset.
Make position finalisation happen in the same phase as scenery load, i.e as a task during the main loop, instead of during the init loop. This is compatible with the existing reset logic. Unfortunately more work is needed; the environment code doesn't update the local station quickly enough on reset. (Fixing that is next!)
2012-12-15 15:25:45 +00:00
Thomas Geymayer
c9976155d6 Update to latest SimGear and fix eating up every 2nd scroll event 2012-12-13 23:39:41 +01:00
Thomas Geymayer
4bf4754f7b Allow Canvas Windows to be resized by dragging
- Setting 'resize' property to true on canvas::Window shows
   resize icons and exposes requested size to the property
   tree. This can be used eg. from Nasal to actually resize
   the window and/or show a preview of the resized window
   while resizing.
 - Event handling now ignores events which have already
   been handled. Before eg. clicking inside a window
   also caused picking to be performed inside the
   scene which is for sure not the expected behaviour.
 - Also forwards scroll wheel events from canvas::Window.
2012-12-13 14:12:29 +01:00
James Turner
1c8d9ef132 Search the current aircraft-dir implicitly.
If a file is specified without an 'Aircraft/subdir' prefix, check for it relative to the the current aircraft dir.
2012-12-13 09:10:39 +00:00
James Turner
18506d3e65 FlightHistory: spatial limit on captures.
If you're not paused, but are stationary, don't record captures.
2012-12-11 09:17:25 +00:00
James Turner
e88e821567 Flight-history men usage cap.
Beyond a certain cap (currently 4MB), recycle buckets. With the default sample rate of 1Hz, this gives over 24 hours of history before recycling.
2012-12-11 00:10:57 +00:00
James Turner
433af2b51a Flight-path-history.
Record the historical flight-path (by default, since last takeoff). Optionally display the flight-path in the map; other visualisations (e.g., an 'in-world' view) could also be created. Nasal API to follow so Canvas-map or FMS can show the same data.

Altitude and attitude (Euler angles) are currently recorded but not used anywhere.
2012-12-10 18:11:44 +00:00
Thomas Geymayer
e62649e075 CanvasWidget: Retrieve texture id every frame.
If the size of a Canvas changes also the texture id
changes. We now retrieve the texture id for the CanvasWidget
every frame to ensure it uses the latest texture instance.
2012-12-09 23:15:49 +01:00
James Turner
dc132ab475 Issue #809, restructure position init code.
Modify startup sequence, so position can be modified late in the startup process, right before the scenery load starts. This allows two ugly hacks to move to a permanent, less hacky location. If other position init modes required similar late evaluation in the future, this can be accommodated now.

This is a somewhat high-risk change - I've tested both carrier starts and runway-selection based on realwx METAR, but please look out for other position-init issues and test before / after this patch.
2012-12-09 19:41:31 +00:00
Thomas Geymayer
13cec7bd99 Canvas MouseEvent now provides client and screen position 2012-12-08 15:02:15 +01:00
Thomas Geymayer
91bc5e522a Canvas add event time and expose current click count 2012-12-06 23:27:25 +01:00
Stuart Buchanan
b7f739ced4 Generate RNG at start of day, and pass down the stack for cloud generation. 2012-12-05 22:12:00 +00:00
Thomas Geymayer
ed211b043a Expose canvas::Element::getTransformedBounds to Nasal 2012-12-04 23:59:21 +01:00
Thomas Geymayer
fee2844ec3 Fix #953. 2012-12-03 09:28:48 +01:00
James Turner
88847ab02e Whoops, work-around for #926 correctly.
Hyde confirmed this fixes the issue, leaving the code present but disabled for the moment.
2012-12-02 23:55:35 +00:00
Thomas Geymayer
ab1c0e946f Fix calculating CanvasWidget mouse coordinates 2012-12-02 23:59:44 +01:00
Thomas Geymayer
8d8e9c3913 Fix for old PUI versions 2012-12-02 15:47:21 +01:00
Thomas Geymayer
28f2779c4b Forward mouse events from (PUI) CanvasWidget to Canvas for new DOM like callbacks 2012-12-02 13:33:16 +01:00
Thomas Geymayer
5e85bcacc8 Canvas: Expose more methods to Nasal.
- Expose canvas::Group::getElementById to Nasal
 - Expose canvas::Group::getChild to Nasal
2012-11-30 17:32:13 +01:00
Thomas Geymayer
f7544744bb Update for latest SimGear changes and remove some old code 2012-11-29 17:57:01 +01:00
Thomas Geymayer
af0bbfd657 Expose simgear::canvas::Group::createChild to Nasal 2012-11-29 01:25:01 +01:00
James Turner
ebded9d981 Bug 926
Disable elevation mixup for naiads, since it is introducing inconsistencies between the navdata and the scenery. (Actually it's exposing inconsistencies between the airport and navaid data, but that can't be fixed right now)
2012-11-28 13:41:58 +00:00
Frederic Bouvier
ef84524eba MSVC 11 compile fix 2012-11-28 09:08:57 +01:00
ThorstenB
59448f11cc #952 terrasync not scheduling tiles before sim reset 2012-11-28 00:26:47 +01:00
James Turner
6434163e65 Bug #927 - flightplan XML loading.
This bug was caused by the code not tolerating missing navaids / waypoints. Update logic so missing navaids degenerate to basic waypoints without problem. Also tolerate present, but empty, runway properties - don't throw an exception by looking up empty identifiers.
2012-11-27 22:42:46 +00:00
Stuart Buchanan
fe1d04df8a Add properties to allow control of precipitation level externally. 2012-11-27 22:17:30 +00:00
ThorstenB
a28fe51ccf Fix FGAIFlightPlan waypoint issues
Iterator must be reset after clearing waypoint list.
Deleting "*waypoint.end()" doesn't delete the last waypoint (end()-1
does - it is never actually used though).
2012-11-27 21:02:32 +01:00
ThorstenB
4b8e0740c4 Fix compile error "ISO C++ forbids initialization of member" 2012-11-27 21:01:03 +01:00
James Turner
6365ad5dae Add the scenery paths to the DB, and check them.
When the scenery paths change, we need to rebuild the nab-cache, since Airports/ data may have changed - e.g. someone installing custom scenery with updated ILS / thresholds.
2012-11-27 18:17:59 +00:00
James Turner
c8996d86b8 Handle DB-locked errors.
When multiple processes (right now, multiple copies of fgfs, but potentially other users in the future) access the navcache, it can cause SQLite to return a 'locked' error, so the request should be re-tried. Add code to do this.
2012-11-27 17:34:52 +00:00
Thomas Geymayer
e5286f1217 More work on Canvas event handling/adapt for simgear changes 2012-11-27 13:56:53 +01:00
ThorstenB
b8a3d6902e Stop AI aircraft's sound when removing
Sound manager keeps a reference to _fx, so reducing its ref-count isn't
enough - it must be removed explicitly.
2012-11-27 00:02:28 +01:00
ThorstenB
57410852b9 Base fullscreen detection on window decoration
rather than window size, since the size of full screen windows can change:
e.g. Xinerama mode automatically resizes fullscreen windows to cover the
area belonging to a single display only - so the
"(Xinerama) screen area == window size" check always failed - even in
fullscreen mode.
2012-11-27 00:02:28 +01:00
ThorstenB
7ed8b625c9 Fix a couple of 64-bit warnings identified by GCC.
PositionedID is of "int64_t", which depends on platform: apparently it is
"long long int" for Mac (requiring %lld format), but it is "long int" for
64bit Linux (requiring %ld). To avoid a "compiler warning fix commit
war" ;-) use a type cast to the longest common type (long long int).
2012-11-26 00:23:10 +01:00
James Turner
63c95642c8 Work on AIAircraft gear animation.
Inspired by Harald's patch, attempt to get AI models show realistic gear animations. Unfortunately AI models seem to be ignoring the gear properties, so keeping the code disabled until I can trace down why.
2012-11-25 21:37:15 +00:00
James Turner
979ca55197 Fix a couple of 64-bit warnings identified by Clang. 2012-11-25 21:35:17 +00:00
ThorstenB
a74c99ec51 Add debug check to NavCache
reporting suspicious filesystem timestamp changes.
2012-11-25 16:41:10 +01:00
ThorstenB
1c6643d7ac traffic: more pass by reference + member init 2012-11-25 16:41:10 +01:00
ThorstenB
b682ae91d6 Traffic: preemptable flight scheduling
FGAISchedule::update can be time consuming. Preempt when necessary to
avoid simulation lags, and call it every sim iteration, until the flight
plan is complete.
2012-11-25 16:41:10 +01:00
James Turner
7d88714e2d Fix duplicate runway wpt in default approach. 2012-11-24 13:50:37 +00:00
ThorstenB
f0778a110b MSVC compile issues. 2012-11-24 13:33:36 +01:00
ThorstenB
ff49cd7acf AIFlihtPlan: Proper member initialization
(i.e. "isValid" needs to be initialized unconditionally)
2012-11-24 13:30:00 +01:00
James Turner
ec2975bac3 Fix some groundnet cache issues.
ThorstenB identified some cases where mod-times changing could lead to corrupted ground-cache data in the DB - handle both of these. What's still unclear is why the mod-times changes; hopefully the additional debug info will reveal this.
2012-11-24 12:14:56 +00:00
ThorstenB
830526a793 Traffic performance: add airport memory cache
to avoid repeating identical NavCache/SQL queries. Also ensures we're
not using multiple FGAirport instances for an airport - each triggering
identical queries to pull in airport data.
Airports by ICAO ID are requested very frequently at run-time, so caching
significantly boosts performance.
2012-11-24 12:42:31 +01:00
ThorstenB
439ad4a7c8 Traffic performance: cache track length
Track length is calculate every iteration/for every aircraft. Since some
tracks have hundreds of waypoints, calculation is slow. Cache the
track length between the waypoints ahead, so it rarely needs to be
recalculated.
2012-11-24 12:06:20 +01:00
ThorstenB
bb494e52e5 Performance improvement: pass (const) strings by reference
to avoid copying actual string data around.
2012-11-24 11:59:13 +01:00
Mathias Froehlich
44ffdcd7d0 hla: add io chanel configuration shortcut hla-local. 2012-11-24 09:58:53 +01:00
ThorstenB
35196ce18c Add more debug output to NavDataCache
showing exactly which file triggers a cache rebuild.
2012-11-23 22:35:06 +01:00
ThorstenB
458edb9339 Use more specific logging classes for SG_LOG.
The log filters aren't really useful when everything uses SG_GENERAL.
2012-11-23 21:16:08 +01:00
ThorstenB
1827825fcb Clean up namespace issues
avoiding "uses..." in header files.
2012-11-23 21:16:08 +01:00
ThorstenB
4a53002784 Fix compiler warning with sprintf format
since PositionedID is "long int", not "long long int".
2012-11-23 21:16:07 +01:00
Thomas Geymayer
846a838c70 Expose NasalSys::gcSave/gcRelease to Canvas 2012-11-22 01:06:22 +01:00
James Turner
bca6e9e890 Break upwards dependency on Traffic in the AI code
AIManager had unfortunate code to pass some state to the traffic-manager; this is no longer required since traffic schedules hold onto their AI-Aircraft directly as needed.
2012-11-21 14:49:34 +00:00
James Turner
77ca03da4d AIManager cleanups, no functionality change. 2012-11-21 14:03:17 +00:00
Thomas Geymayer
258d387d15 Allow setting emission for each canvas placement 2012-11-21 13:07:57 +01:00
James Turner
563ea69d34 Missing std:: namespace in a header. 2012-11-20 17:09:09 +00:00
James Turner
51a1c86f00 Quiet some log output. 2012-11-20 17:08:56 +00:00
James Turner
9632bfcfd6 View-manager: update globals automatically.
Make the global view-manager pointer be controlled by the instance.
2012-11-20 13:33:20 +00:00
James Turner
04598859e3 Make PUI menu-bar reinit safe.
Was only cleaning up the PUI menubar, not old bindings / names. This led to duplicate bindings, each time the GUI was reset, which can happen for various reasons.
2012-11-20 13:32:10 +00:00
James Turner
d886f2a5f8 Make EnvironmentMgr shutdown its subsystems.
With this change, Environment subsystem can be removed and re-added at runtime using the factory commands.
2012-11-20 12:31:07 +00:00
James Turner
cabb2a419f Allow a default name when adding subsystems. 2012-11-19 23:22:45 +00:00
James Turner
93237f1b37 Avoid a dependency on the environment-manager.
Change the ASI Mach computation (written by me) to use properties, instead of depending directly on the environment-manager.
2012-11-19 23:17:03 +00:00
James Turner
868b7b40dc Many more subsystems via the factory.
Not all of these are tested to actually be safe to add / remove at runtime, but an increasing number are.
2012-11-19 23:03:08 +00:00
James Turner
f1a7950202 XMLHttpRequest: only set failure signal on failure
Use failure as a real signal property - only set it / fire listeners on a real failure condition.
2012-11-19 23:02:35 +00:00
James Turner
18da917ddd Bracket threshold.xml loading in a DB transaction.
Should mitigate (but not completely fix, yet) bad map performance when initially zooming out, or panning when zoomed out.
2012-11-19 22:24:10 +00:00
Thomas Geymayer
82884ab3c6 Improve finding gperftools and disable profiling by default (even with gperftools installed) 2012-11-19 13:11:03 +01:00
James Turner
379e7a2fd5 Make HTTPClient a proper subsystem.
Avoid some statics, and incidentally make the proxy host/port settings dynamic (re-init the subsystem to update proxy settings, woo).
2012-11-19 11:30:12 +00:00
ThorstenB
be3f94f63a Remove static subsystem dependencies
preventing us from recreating subsystems on reset/reinit.
2012-11-18 17:29:29 +01:00
Thomas Geymayer
d51499382d Clean up CanvasWidget and more work on Canvas/Nasal bindings 2012-11-18 16:46:03 +01:00
ThorstenB
58380b286e Fixed some uninitialized member vars and a mem leak. 2012-11-18 16:39:22 +01:00
ThorstenB
a784443a24 Remove static property dependencies
preventing us from wiping properties on reset/reinit/subsystem recreate.
(more work required for "native_gui" and "ATC-Outputs" protocols)
2012-11-18 16:35:54 +01:00
ThorstenB
1f1dd1fa16 viewmgr: fix mixed up white-spaces/indentation
(content otherwise unchanged)
2012-11-18 13:23:10 +01:00
ThorstenB
d761da248f viewmgr: stash properties for better performance 2012-11-18 13:17:07 +01:00
ThorstenB
01617861ce toggle fullscreen: also adapt GUI plane when resizing 2012-11-18 00:00:15 +01:00
ThorstenB
b577ec70fc Add command to toggle fullscreen mode. 2012-11-17 23:07:00 +01:00
ThorstenB
4e6f0e18fd YASim airborne start-up
Gear should be up when starting in-air.
2012-11-17 20:05:16 +01:00
ThorstenB
adc95a4b55 #600, for Curt... ;-) allow speed-up value to use fractions
"speed-up" can now also be used for slow-motion (i.e. 0.5 / 0.25 / ...)
or fractional speeds (3.141...). This was already working for instruments
(for replay) before, now it's also considered by FDM simulation.
2012-11-17 20:01:19 +01:00
James Turner
8a954f8338 Support request body on xmlhttprequest.
Allow XML property data to be submitted with a request; changes the request method from GET to POST. Supply nodes via the 'body' argument to the command.
2012-11-17 18:10:15 +00:00
ThorstenB
bf0dbb22d0 #931: some VOR+ILS stations not working on 32bit machines
When casting to int, always remember the ugly effects of floating-point
(im)precisions ;-).
2012-11-16 22:46:41 +01:00
James Turner
91c6e3433d Further work on bug 905.
Tolerate Octree leaf children which have been moved outside their leaf's BBox. This is necessary since lazy-loading of ILS and threshold files can cause re-locations even during child traversal, where updating the hierarchy is very complex. Instead, simply tolerate this case, and rely on the real position data (which is correct).
2012-11-16 16:43:54 +00:00
Thomas Geymayer
48c1b51875 Add new property indicating whether profiler is available 2012-11-16 12:59:44 +01:00
Thomas Geymayer
1a0fcd5f56 NasalCanvas: Clean up and expose Element node ghost 2012-11-16 12:34:38 +01:00
ThorstenB
9d067bc890 #918: fix jsbsim in-air repositioning issue 2012-11-15 20:20:40 +01:00
ThorstenB
791389cb98 #895: AI traffic not working when system is offline but real-wx is enabled
Add a timeout when waiting for valid METAR.
2012-11-15 20:20:40 +01:00
ThorstenB
7fa2aecc22 fgprotocol: delete io channel on shutdown 2012-11-15 20:20:40 +01:00
ThorstenB
e8fc85ef7e jpg-httpd: Add error messages when unable to open port etc.
Also move private code to cxx file.
2012-11-15 20:20:40 +01:00
ThorstenB
58158bf51f jpg-httpd: consistent indentation and white-spaces
(no content change)
2012-11-15 20:20:40 +01:00
Thomas Geymayer
779a9ae415 Really make profiling commands optional 2012-11-15 13:56:31 +01:00
Thomas Geymayer
0761af344d Visual Studio bug workaround 2012-11-15 12:43:35 +01:00
Thomas Geymayer
859e92a8ed Experiment with exposing more canvas methods 2012-11-15 12:43:34 +01:00
Thomas Geymayer
892806cb3f More cleanup an move of helper classes to simgear 2012-11-15 12:43:34 +01:00
Thomas Geymayer
724d54b3a3 Clean up and some more testing 2012-11-15 12:43:34 +01:00
Thomas Geymayer
863cd6a290 Canvas/Nasal and Nasal/C++ binding experiments 2012-11-15 12:43:34 +01:00
Thomas Geymayer
fe1222a90d Optional profiling commands using gperftools 2012-11-15 11:55:37 +01:00
Frederic Bouvier
b88e941ca2 MSVC compile fix 2012-11-15 08:42:10 +01:00
James Turner
78d97fa468 Support for creating default SID/approach.
Durk reminded me of this - when we're missing procedures data (the common case), synthesise a plausible (but possibly dangerously unrealistic) departure and approach. Will work fine for airports in gentle terrain, and likely kill you at challenging airports. You have been warned.
2012-11-12 22:30:28 +01:00
ThorstenB
25138930e3 replay system: protect from recording multiple records for identical time
And avoid div by zero when dt==0 for recorded data.
2012-11-11 17:36:10 +01:00
ThorstenB
1d99401c04 Remove osg dependency for isNaN only. 2012-11-11 17:22:42 +01:00
Mathias Froehlich
354a1b3a0b hla: Use hla derived classes part 2 2012-11-11 16:30:55 +01:00
Mathias Froehlich
518cd00094 hla: Use HLADataElementIndices instead IndexPathPairs. 2012-11-11 16:30:49 +01:00
Mathias Froehlich
f4d344d44a hla: Replace the object class callback by it's object class. 2012-11-11 16:30:43 +01:00
Mathias Froehlich
c90d3429aa hla: Use hla derived classes part 1. 2012-11-11 16:30:36 +01:00
ThorstenB
fdb64a02a8 Extended replay and flight recording system
Save/restore replay sessions.
Replay system message support, so recorded flights can be turned into
flight tutorials.
2012-11-10 21:26:08 +01:00
James Turner
08d82294bd Fix bug 905.
When a position is modified for an in-cache FGPositioned, we need to update the runtime information too, or the Octree code may (rightly) complain that it's seeing inconsistent data. Also make the Octree check an exception throw, and verbose, so this is easier to detect in the future.
2012-11-10 14:48:00 +00:00
Stuart Buchanan
b7e79c1231 For clouds use a RNG seed that stays the same for 10 minutes.
This allows multi-process systems to stay in sync and display the same
clouds.
2012-11-09 20:29:28 +00:00
James Turner
18e3fc0c82 Bug 921
Fix GPS search functionality, I mixed up the SQlite wild-card operator.
2012-11-08 18:31:16 +00:00
James Turner
afcdbd3158 Overhaul the ground-net / parking code.
Use the nav-data-cache to cache groundnet information, including
parking positions and the taxi-node graph.
2012-11-08 09:07:05 +00:00
James Turner
72131a4a49 Alexis Bory:
The purpose of this little cosmetic patch is to ease the use of proptest's output in a ploter.
2012-11-08 09:06:24 +00:00
Thomas Geymayer
7e7d921515 Adapt for latest SimGear changes and insert missing bracket 2012-11-06 18:50:14 +01:00
Thomas Geymayer
c79510ef34 Fix include and compiler warning 2012-11-04 23:03:06 +01:00
Thomas Geymayer
28779e7a51 Update for new simgear Canvas system.
A refactored version of the Canvas system can now be found in
SimGear.
2012-11-04 14:18:31 +01:00
ThorstenB
4a535f67c0 Add error messages when unable to open HTTP port.
Also move private code to cxx file.
2012-11-01 19:34:27 +01:00
ThorstenB
46fdb2079d Remember MP online status throughout a sim reset. 2012-11-01 15:49:45 +01:00
ThorstenB
d15d2ad270 Jean Pellotier: don't show markers for invalid targets in HUD
Don't show invalid AI/MP models in the HUD (after they were removed from
the scene).
Also, when a radar is installed, consider radar/in-range for HUD display.
2012-11-01 15:31:05 +01:00
ThorstenB
82bfb96d23 Add different error message when an FDM is disabled.
Better shows the difference between "unknown" and "disabled" FDMs.
2012-11-01 15:03:01 +01:00
ThorstenB
51f16337c2 #903: generic protocol: fix a rare corner case
ASCII protocols consisting of a single chunk only (one variable per line)
would not work when no "separator" was defined.
Also add error message for protocols with more than one var per line which
are missing a separator...
2012-11-01 14:42:26 +01:00
ThorstenB
5049ecce71 fg_io: Fixed mem leaks. 2012-11-01 14:42:26 +01:00
ThorstenB
a704a62081 Fix indentation and mixed-up white-space/tabs
(content otherwise unchanged)
2012-11-01 14:42:26 +01:00
Thomas Geymayer
71eeb62c1b Simplify canvas OpenVG initialization and fix sometimes rendering too lazy 2012-10-31 01:44:25 +01:00
James Turner
c79e2465df Traffic improvements.
Make landings and takeoffs look more correct; tweak climb-out and touchdown phases in particular, so the turn to destination heading occurs earlier on climb out, and touchdown occurs close the GS transmitter / some distance down the runway from the beginning.
2012-10-30 15:43:54 +00:00
Thomas Geymayer
4e75587332 Refactor PropertyBasedElement and Manager 2012-10-29 16:19:13 +01:00
James Turner
7c8ad455a3 PerformanceDB improvements.
Support cascading (inheriting) performance data, so common values don't need to be repeated.
2012-10-29 10:01:52 +00:00
Thomas Geymayer
79f7907a82 Let Nasal props.Node.removeChildren behaviour consistent (Don't keep deleted nodes) 2012-10-22 17:59:19 +02:00
Thomas Geymayer
2ad82a1b60 Move FGODGauge implementation to SimGear 2012-10-19 11:59:36 +02:00
Thomas Geymayer
b22ede2fd5 Expose SGPropertyNode::addChildren to Nasal 2012-10-14 17:39:53 +02:00
ThorstenB
076bbb8487 Fix some compiler warnings.
Unused vars, loss of precision, bool type conversions.
2012-10-13 17:59:47 +02:00
ThorstenB
32b9c61528 ATIS upgrade
Add missing ATIS elements (transition level, expected approach,
precipitation, runway surface warnings).
Minor phraseology fixes for US/Europe.
Adds "/sim/atis/concise-report" option to use abbreviations (CAVOK etc),
and omit "obvious" units (depends on airport).
Trigger ATIS updates for significant pressure changes.
2012-10-13 16:48:56 +02:00
ThorstenB
60eaa22fda Drop sorting of Nasal scripts.
simgear::Dir now always provides results in a deterministic order.
2012-10-13 15:45:15 +02:00
ThorstenB
395c317627 ATCVoice: support multiple voice files
so we can split ATIS voice files into separate files, i.e. for airport
names and phraseology, so we don't need to regenerate airport names when
extending/changing phraseology. Also allows to add custom airport names.
Enable switching voice files at run-time (different airports could have
different voices...).
2012-10-13 15:45:15 +02:00
ThorstenB
9bb9a78249 Stash properties 2012-10-13 15:45:15 +02:00
Thomas Geymayer
78b5dfb58b Expose SGPropertyNode::addChild to Nasal 2012-10-13 15:13:56 +02:00
Anders Gidenstam
a44acfa875 merge-requests/1566: Adjust indentation. 2012-10-12 23:48:09 +02:00
Vivian Meazza
bbea07e8b1 Bugfix: correct calculation of range and realtive bearing when parent is not the main model.
Signed-off-by: Vivian Meazza <vivian.meazza@lineone.net>
2012-10-12 23:45:56 +02:00
ThorstenB
b838691f50 #897: float vs double precision issues (frequency dialog not always working)
puObject only provides float, not double, which causes precision/rounding
issues with some numerical values (try "114.2").
Work around: obtain string value, and manually convert with proper double
precision.
2012-10-10 20:28:17 +02:00
James Turner
607e7d7bf3 Use an SGGeod inside FGAIFlightPlan::Waypoint.
This allows incremental refactoring to move away from discrete lat/lon use in favour of SGGeod.
2012-10-08 15:52:06 +01:00
Mathias Froehlich
fd23f5dee5 hla: Fix velocity units. 2012-10-07 22:23:04 +02:00
ThorstenB
ccb890447a Improve gyro heading indicator failure simulation
Error/offset induced by precession and yaw also depend on spin (no spin =>
no additional error/offset).
Error/offset induced by changing a/c orientation while gyro spin is
low (<<1) should apply to the "offset" (instead of "error") property.
2012-10-07 20:47:50 +02:00
James Turner
4994973ef4 Separate instruments from cockpit displays. 2012-10-05 18:13:50 +01:00
James Turner
7d547d1287 Make traffic take-off roll look a little better.
Expand the performance DB logic to support aliases, and select based on aircraft type as well as class. This allows to introduce some variation into AI traffic performance. Change the initial climb-out waypoints to use pitch-hold until passing 3000', which looks much more convincing
2012-10-05 18:12:46 +01:00
James Turner
1e5bd162e7 Use a helper thread to init the traffic-manager.
Make traffic manager startup asynchronous, but also avoid frame-stutter due to file parsing on the main thread. Note only XML parsing happens on a thread - once that's complete, everything happens as normal on the main thread, as before.
2012-10-05 09:33:04 +01:00
ThorstenB
2bdcde5a4b Split ATIS generator into smaller, more readable methods. 2012-10-05 00:22:02 +02:00
ThorstenB
575f576aa9 Revive master sound enable switch. 2012-10-05 00:17:28 +02:00
ThorstenB
109d04b605 Fix ATIS output.
Need to call inherited update to control volume and enable/disable
depending on sound ATC switch.
2012-10-05 00:07:40 +02:00
ThorstenB
06a8a9c536 Fix Linux build: "malloc" needs stdlib.h 2012-10-04 21:14:48 +02:00
Mathias Froehlich
74f07982bd Provide reader writer options to the effects. 2012-10-03 22:03:25 +02:00
James Turner
5eb2f74e99 Run the filters for comm/navaids as required.
Apparently most filters are only filtering on type - we weren't running the filter body for navaid or comm-station lookups, causing weird ATIS bugs. Ensure that we actually run the filter at the point we have an FGPositioned* result.
2012-10-01 13:06:28 +01:00
James Turner
bcea720db3 Make the sound-manager optional in a few places. 2012-10-01 10:10:34 +01:00
James Turner
21d50b11f5 Make FGVoicePlayer.hxx not require sample_openal.hxx 2012-09-30 20:23:13 +01:00
James Turner
7b8804bd40 Tolerate refactored SGSound headers.
An upcoming commit will make the sound headers standalone, and no longer include various other headers / using std:: declarations. Prepare for this by making includes and usage of namespaces explicit.
2012-09-30 19:40:08 +01:00
James Turner
8608a48073 Initial work on dynamic subsystem creation.
Make subsystems create-able and removable from commands. Only some subsystems are supported so far, since many have non-default constructors or other complexities.

With this, change, it's possible to dynamically add and remove the traffic-manager at runtime, for example: fgcommand("add-subsystem", props.Node.new({ "subsystem": "traffic-manager", "name":"traffic-manager", "do-bind-init":1}));
2012-09-30 16:34:51 +01:00
James Turner
3b6c2c426d Support a --no-default-config option.
For (future) easier testing of the sim, support a mode where only explicitly named config / option files are loaded, instead of the default ones. (Including, for example, preferences.xml). This currently produces a non-functional sim, but will soon be more useful :)

No behaviour should change unless you try the new option.
2012-09-29 19:02:03 +01:00
Thomas Geymayer
f462dfdfac Canvas: default fill-rule to evenodd and make it configurable 2012-09-29 19:54:31 +02:00
James Turner
cd7a02ca69 Make FGControls behave like normal subsystem.
FGControls create/init/bind order was incorrect, causing initial property tree state to get over-written. Restructure the code so bind() sees correct values.
2012-09-28 15:32:31 +01:00
Thomas Geymayer
65f2881770 Fix finding ATIS CommStation 2012-09-27 17:03:14 +02:00
James Turner
8c80824dbd Tweak init order of controls/input. 2012-09-27 15:33:12 +01:00
James Turner
fe3a1424eb Restore the fdm-init check to splash-screen logic.
Guessing this is the cause of the splash-screen coming down early in some cases. Adding this back to confirm or deny that guess.
2012-09-27 15:15:02 +01:00
Thomas Geymayer
37d0c19f7c Canvas: Make path destroying more robust 2012-09-27 14:41:00 +02:00
Thomas Geymayer
5ac3de21e3 Fix some CommStation bugs
- kHz/mHz conversion needs factor 1000 not 100
 - Correctly read name for CommStations from NavCache
 - Fix parsing CommStation names from apt.dat (Name
   can contain spaces)
2012-09-27 12:21:22 +02:00
James Turner
682d78301e #793 - invalid data on final FP leg.
The Flight-plan leg data computation was omitting certain data for the final waypoint, which in turn made some of the route-manager data bogus when flying the final leg. Fill in some sensible values which we can compute.
2012-09-27 09:27:48 +01:00
Thomas Geymayer
f00bcad479 Fix ATIS /environment/attention handling
Using a tied property works only for one single usage of the
property. In reality FGATIS is normally instantiated four
times (nav/comm/1/2) where only the first instantiation
works correctly. All subsequent instantions fail to tie
and show some error messages.
Also tied properties shouldn't be used anymore.
2012-09-27 00:42:06 +02:00
James Turner
8e3314a7ec Make the radio interpolation tables static.
No need to read these again for each navradio - and the marker beacon doesn't use them at all.
2012-09-26 23:10:37 +01:00
Thomas Geymayer
b8b4fb00f8 Canvas: On z-index change move element always to last position of elements with same z-index 2012-09-26 23:52:43 +02:00
James Turner
0f927d5766 Part of bug 885
Allow the route-manager to be explicitly de-activated.
2012-09-26 22:43:19 +01:00
Frederic Bouvier
ba8190d97f Close Sqlite3 database *before* trying to delete the file. Will avoid a segfault when the schema is out of date 2012-09-26 22:34:48 +02:00
Thomas Geymayer
3b10fc5f3e Canvas: Support z-index inside Groups/Maps 2012-09-26 18:09:06 +02:00
James Turner
872e84d827 Make HUD items private to the subsystem.
Make the HUD independent of the instrument manager, and push most of the declarations from the header into a private header.
2012-09-26 17:02:11 +01:00
James Turner
1be2aa558f Quieten down autopilot creation log. 2012-09-26 16:25:43 +01:00
James Turner
a67d8e1983 All FPU control happens in bootstrap.cxx
Remove some platform includes which don't belong in main.cxx
2012-09-26 16:25:18 +01:00
James Turner
ebf3a0793d Tolerate the lack of a GUI in some places. 2012-09-26 13:39:38 +01:00
James Turner
b5820a4e90 Fix string-id for message translation. 2012-09-26 13:38:26 +01:00
James Turner
3d4806adbe Remove dead file. 2012-09-26 13:37:31 +01:00
Thomas Geymayer
703bb9bbf3 Retrieve property node once instead of using fgGetXXX 2012-09-26 12:18:47 +02:00
Thomas Geymayer
2f630e502d Let fgGetLong actually return long instead of int 2012-09-25 23:24:29 +02:00
Thomas Geymayer
6dd4782254 Canvas: Proper fix for OpenVG init handling.
- Redraw all canvases in the frame OpenVG is initialized.
   Otherwise if multiple canvases are created in the same frame
   only one of them would get correctly updated.
2012-09-25 23:24:29 +02:00
ThorstenB
dac8706e2e Move GUI init code to gui module. 2012-09-25 22:39:13 +02:00
ThorstenB
e5b81a8bb6 Minor pointer safety and compiler warning issues. 2012-09-25 22:10:06 +02:00
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
James Turner
ffbb0a0e5d Sink position-init code into its own file.
Separate other init functions from position init, since they are unrelated, and made fg_init.cxx very complex. Next step will be brining some sanity to the position init logic :)
2012-09-18 20:50:28 +01:00
James Turner
e2eea405a3 Make subsystem init incremental.
(Requires latest SimGear!)

Break fgInitSubsystems into several phases - subsystem creation, then binding and then init. Run init over multiple main-loop iterations so the application stays responsive to GUI/OS events during init. 

There should be no behaviour changes due to this, except that during init Windows and OS-X should no longer show the beach ball / 'application not responding feedback', hopefully.
2012-09-18 20:29:36 +01:00
Stuart Buchanan
9d30d622ae Expose the shader language version, to help diagnostics. 2012-09-18 15:48:06 +01:00
James Turner
39307d335c Avoid an 'overloaded-virtual' warning.
Clang reports an overloaded-virtual in FGGeneric (and it's correct). Rename the overload to avoid both the warning and confusion.
2012-09-18 00:59:36 +01:00
James Turner
505796e349 Make magavr a regular subsystem.
Remove various hacks and make magvar work like a normal subsystem, as part of the environment manager. Fix the remaining users of the globals->get_mag accessor, and hence kill off the global pointer.
2012-09-18 00:58:27 +01:00
Thomas Geymayer
9f5790c843 Canvas: Use seperate projection instance for each map 2012-09-18 00:33:36 +02:00
ThorstenB
01376eec31 Minor main loop/init clean-up 2012-09-17 13:45:31 +02:00
ThorstenB
fa0a7f8700 Avoid compiler warnings. 2012-09-17 13:45:31 +02:00
ThorstenB
06170ddaae Handle scenery-override in a single place only. 2012-09-17 13:45:31 +02:00
ThorstenB
7415696492 Create FGSoundManager as a wrapper for SGSoundMgr_OpenAl
and sink all sound related code from main.cxx in there.
2012-09-17 13:45:31 +02:00
ThorstenB
043128c7c0 Prepare and implement reinit methods for instruments
to clear error conditions, drifts, offsets etc
2012-09-17 13:45:30 +02:00
Mathias Froehlich
65a5f6744f cmake: Make rti/hla compile again. 2012-09-16 21:16:57 +02:00
Frederic Bouvier
db53e4c0b8 Sort fgfs source files in IDE folders 2012-09-16 19:26:53 +02:00
ThorstenB
f675d51c29 Correct ATIS pressure phraseology
Unit is spoken for all values <1000hPa (to avoid confusion with inHg).
Unit is not spoken for values >=1000hPa (but don't drop highest digit).
(And we should replace "millibars" with "hectopascal" - we're missing the
necessary voice sample though.)
2012-09-16 14:21:11 +02:00
Thomas Geymayer
0554d987e8 property-interpolate: support using rate instead of time.
- property-interpolate now supports specifying the
   interpolation time by passing rate instead of the actual time,
   similar to max-rate-of-change in the noise-spike filter.
2012-09-06 14:05:57 +02:00
ThorstenB
1dbc2c83e5 Minor error message improvement. 2012-09-05 00:00:25 +02:00
ThorstenB
6745d27691 #858: Fix loading issue with aircraft models in "--fg-aircraft" directories
Something after FG 2.8.0 has broken loading aircraft models from
--fg-aircraft directories. Issue is fixed by resolving the aircraft path
in FGAircraftModel (though this module itself hasn't changed and things
were working before...).
2012-09-04 23:57:25 +02:00
Frederic Bouvier
024ef128e3 Better fix for a compilation problem with MSVC 2012 2012-09-03 19:09:35 +02:00
Frederic Bouvier
ace6f4173f Revert "Fix compilation problem with MSVC 2012"
This reverts commit 85ae0697ee.
2012-09-03 19:08:06 +02:00
Frederic Bouvier
85ae0697ee Fix compilation problem with MSVC 2012 2012-09-03 17:33:20 +02:00
Thomas Geymayer
7463ebad1d Canvas: Only use cull callback if it's still valid 2012-09-01 16:50:21 +02:00
Mathias Froehlich
26664aaff0 Push SGMaterial use into these classes that need it. 2012-08-29 06:29:29 +02:00
Mathias Froehlich
7e97a4c693 Fix compile of simgear headless past bvh rework. 2012-08-27 17:58:25 +02:00
Stuart Buchanan
5c78970663 Stop the property tree from keeping a shadow of the deleted input properties, as it can mean that the array of bindings ends up with some incorrect name tags if the set of joystick config files changes and a given js-named entry shifts in the array. This can then result in incorrect bindings being selected. 2012-08-25 22:23:55 +01:00
Mathias Froehlich
e3ad3d3a07 bvh: Adapt to upstream bvh changes in simgear. 2012-08-24 21:24:12 +02:00
Stuart Buchanan
cce186a57c Add properties for raw axis and button values, for use
in joystick configuration function.  Also rationalize references to
/sim/fg-home into a global property.
2012-08-23 21:52:30 +01:00
Thomas Geymayer
ced478cf95 Canvas: CSS like property value inheritance.
- Groups store property nodes for different styles and pass them
   to child elements on creation (No dynamic updates yet)
 - Use StyleSetter map instead of loads of if/else if statements
   for setting element styles.
 - Unify element style properties (Only use one property, instead
   of multiple like it has been with colors)
 - Fix: Create only one element per property node (Was two)
2012-08-23 20:00:13 +02:00
James Turner
8a087582bc Whoops, case-sensitivity matters on Linux. 2012-08-22 00:53:48 +01:00
James Turner
588eba658a Make some include dependencies explicit. 2012-08-22 00:07:53 +01:00
James Turner
45d2e693ee Fix a crash encountered with ATC.
This might need to be back-ported to 2.8 (to make a 2.8.1), unless it's been exposed by some of my other changes. Which I think is unlikely but not impossible.
2012-08-21 18:12:25 +01:00
James Turner
7fabeed85d Fix some places relying on public 'using std::string' in SimGear
(Otherwise my next SimGear commit will break them)
2012-08-21 17:07:47 +01:00
James Turner
688d76613e Expose SGCondition as a ghost to Nasal directly. 2012-08-19 21:13:31 +01:00
ThorstenB
59fe04f8e9 Make web browser app configurable through CMake (for Linux)
so package builders don't need local patches.
Also, instead of hardcoded firefox, use "xdg-open" or "sensible-browser"
launchers on Linux, to auto-detect user's preferred browser.
Override with cmake switch -DWEB_BROWSER=...
(Not affecting Mac/Win which are hard-coded anyway).
2012-08-18 14:11:31 +02:00
ThorstenB
a3e76909ee Christoph Korn/PlayDeb.net: fix typos 2012-08-17 23:51:30 +02:00
Thomas Geymayer
ec73c62da5 Canvas: Fix stupid off-by-one error 2012-08-13 20:29:08 +02:00
Thomas Geymayer
875b59952b Canvas: Bugfixes
- Fix dependency cycle
 - Correctly forward mouse release event
2012-08-13 14:11:26 +02:00
Thomas Geymayer
624522b426 Canvas: Don't crash if texture not available 2012-08-12 20:23:31 +02:00
Frederic Bouvier
e6cb846ad3 Don't let the cloud alpha value change the lighting buffer 2012-08-12 19:06:41 +02:00
Thomas Geymayer
948d87e561 Canvas: Basic support for window stacking 2012-08-11 23:38:04 +02:00
Frederic Bouvier
b7b4553db6 Add forgotten uniforms to the display stage (Rembrandt) 2012-08-11 12:19:44 +02:00
Thomas Geymayer
544784ca85 Canvas: Forward mouse events to elements.
- Use bounding box intersections to determine which element is
   hit.
 - Transform mouse coordinates to local coordinates.
 - Try to get osgText bounding box correct (or at least better)
2012-08-10 13:11:06 +02:00
Thomas Geymayer
288e7fa5ca Canvas: default image element dimensions to texture size 2012-08-09 21:58:55 +02:00
Thomas Geymayer
83bbd9e45c Canvas: Image/Window unifying and allow using canvas inside canvas.
- Refactor and unify common functionality of canvas::Window and
   canvas::Image
 - Make canvas::Image actually work
 - Allow using canvases inside canvas::Image
   * Use new canvas:// "protocol" to allow using canvases in
     place of images
 - Prepare for categorizing canvases:
   * Move canvases to /canvas/by-index
   * Later support linking to other nodes in subbranches of
     /canvas
2012-08-09 16:13:38 +02:00
Thomas Geymayer
350d508324 Clean up
- Replace deprecated boost::shared_static_cast with
   boost::static_pointer_cast
 - Use boost::ends_with in favor of own implementation.
2012-08-09 13:22:48 +02:00
James Turner
310ddbf8c5 Initial work on Image element for Canvas. 2012-08-05 22:43:01 +01:00
James Turner
4593c3521f Fix a crash with the native menubar.
http://code.google.com/p/flightgear-bugs/issues/detail?id=821
2012-08-05 21:30:15 +01:00
James Turner
bd0a5d825d Cocoa clipboard implementation.
Fix OS-X build by supplying a Cocoa clipboard implementation.
2012-08-05 21:00:05 +01:00
Thomas Geymayer
052d578483 Canvas: Fully remove Window drawable if destroyed 2012-08-05 18:06:56 +02:00
Thomas Geymayer
d6a5a911bc Complete X11 clipboard support.
- Now ClipboarX11 also supports writing to the clipboard and
   sending the data to another application if requested.
2012-08-05 11:19:24 +02:00
Thomas Geymayer
aa9d0e3a8a Basic clipboard access from Nasal.
- Add platform independent clipboard layer for Nasal access
   to clipboard (thanks to Hooray for basic code)
 - Add Windows clipboard access
 - Add partial X11 clipboard access (only reading from clipboard)
 - Add fallback clipboard for application internal clipboard if
   platform not supported
 - Add some helper functions to FGNasalSys
2012-08-04 17:33:48 +02:00
Tim Moore
6110139197 Merge branch 'timoore/optimization' into next 2012-08-03 20:20:01 +02:00
Tim Moore
f2762d0be7 use DeletionManager 2012-08-03 20:18:11 +02:00
James Turner
f94b2d127b Avoid a naming clash on 'canvas' 2012-08-03 10:21:26 +01:00
Frederic Bouvier
c3de8851f8 Fix incorrectly hardcoded effect in last Rembrandt stage 2012-08-02 23:00:20 +02:00
James Turner
f703882ffa Skeleton Nasal-Canvas integration.
This code is non-functional, but contains most of the stubs to show what's required to add property get/set access, convert to from ghost & C++ types, and manage ownership. Element derived classes & inheritance (e.g., methods on image/path/map elements) will follow, along with some actual functionality!
2012-08-02 12:18:38 +01:00
Frederic Bouvier
64a8924035 Add some predefined uniforms to Rembrandt stages 2012-08-01 22:42:00 +02:00
Thomas Geymayer
e980178213 Canvas: Fix warning and rename file. 2012-08-01 10:57:15 +02:00
Frederic Bouvier
766014883c Fix Win32 build - No GLUT please \! 2012-08-01 08:53:40 +02:00
Thomas Geymayer
8a6a234653 Canvas: First version of new Canvas GUI system.
- Refactor CanvasMgr into PropertyBasedMgr to be also used
   for the Canvas GUI system.
 - Get rid of tied properties in the Canvas system.
 - Add new placement type 'window' for placing canvases onto
   windows
 - Pass mouse events to Window class (only if cursor is over
   window)
 - Refactor canvas placement clean up
2012-07-31 23:19:23 +02:00
Thomas Geymayer
5f08e10c0a Canvas: Support for text selection.
- Expose nearest hit for text/character selection
 - Fix culling
2012-07-31 23:19:23 +02:00
Thomas Geymayer
91c3f63110 Canvas: UTF-8 support and more settings exposed.
- Allow hiding objects
 - Use UTF-8 encoding for text elements
 - Add paramter max-width to text elements
 - Support stroke-linecap for path elements
 - Fix mouse coords
 - Set better mipmap filter
2012-07-31 23:19:23 +02:00
Thomas Geymayer
e81db175f4 Canvas: Add new element type map for geo mapping.
- The new map element automatically transforms geo coordinates
   (lat, lon) to the according screen coordinates.
 - Currently one type of projection is supported
   (Sanson-Flamsteed projection)
2012-07-31 23:19:23 +02:00
Thomas Geymayer
a876ff93e1 NasalPositioned: Expose actual postion of parkings 2012-07-31 23:19:22 +02:00
Thomas Geymayer
373d511c69 Canvas: Allow using canvases as PUI widgets.
- Add new widget type canvas
 - Set canvas view dimension from the gui xml.
 - Expose mouse events to canvas widget properties.
2012-07-31 23:19:22 +02:00