1
0
Fork 0
Commit graph

9276 commits

Author SHA1 Message Date
James Turner
bbd15eb370 Fix a typo 2016-04-15 18:03:01 +01:00
James Turner
a63da0cbde Minor improvement to hangar list in the launcher. 2016-04-15 17:27:29 +01:00
James Turner
31cad6d384 Fixes to launcher description rendering. 2016-04-15 17:21:49 +01:00
James Turner
6095646a62 Prompt the user when the default hangar is missing.
In the Qt launcher, when the default hangar isn’t found, show
a hint in the aircraft list.
2016-04-15 17:06:53 +01:00
James Turner
c15e4753ac Different fix for traffic shutdown crash.
Fix for: https://sourceforge.net/p/flightgear/codetickets/1864/
2016-04-15 16:26:54 +01:00
James Turner
43add4f820 Fix stray back-button in Qt launcher
- when no location is set, don’t show the back button.
2016-04-14 18:54:27 +01:00
James Turner
7a36b96790 Update from SimGear API change
- support new HTTP cancellation API
2016-04-14 09:33:28 +01:00
Stuart Buchanan
56374621c5 Make LOD of buildings/trees/objects/STG configurable.
Now using /sim/rendering/static-lod/rough.
2016-04-08 22:38:17 +01:00
James Turner
5e4063b761 Move launcher settings store inside FG_HOME
Settings now in .ini format, at $FG_HOME/flightgear.org/FlightGear.ini
2016-04-08 10:40:26 +01:00
James Turner
5341d327fd Restructure paths handling in the launcher
- move the dialog into a new ‘add-ons’ tab

- separate out ‘restore settings’ from selecting a new fg-data

- actually relaunch the app
2016-04-08 10:26:34 +01:00
Torsten Dreyer
f837f1e808 Merge /u/sanhozay/flightgear/ branch next into next
https://sourceforge.net/p/flightgear/flightgear/merge-requests/35/
2016-04-07 09:47:01 +00:00
Richard Senior
78de2af130 Allow ATIS format specifications to compare tokens against text values
Prior to this change, it was only possible to compare the values of tokens
to each other for use in conditionals, e.g. landing and departing runway.
This change allows comparison of a token to a text value, e.g. to compare
wind speed to zero.
2016-04-07 00:58:34 +01:00
Erik Hofman
02174a1df6 Add the latest fixes and expose all inertias in the property tree 2016-04-06 14:26:30 +02:00
James Turner
ca6424f76a Fix a reset crash with pager threading.
Ensure pager thread is stopped before we touch
the sgUserData reference to the main props tree.
2016-03-28 23:50:47 +01:00
James Turner
08ea386197 Fix corrupt HUD fonts
osg::texture2D changes GL_UNPACK_ROW_LENGTH, which fntLoadTXF is not
prepared to deal with. Reset the value back to 0 before loading +
caching TXF fonts on the PLIB side.
2016-03-28 22:54:24 +01:00
James Turner
c29fa35840 Updated Canvas adaptor getImage API
Return the Image by ref ptr instead of raw pointer.
2016-03-26 20:25:31 +00:00
James Turner
e8398d5cee Fix Clang unused member warnings in JSBsim. 2016-03-26 20:24:57 +00:00
James Turner
6fc2403449 Fix iterator const-ness. 2016-03-24 20:23:39 +00:00
James Turner
5baca8598f Improve download-dir behaviour.
When set on the command line, will be used for aircraft packages. When
set in the Qt launcher, will also be used for aircraft downloads at
all times.

When changing the path in the launcher, the set of aircraft catalogs
is refresh automatically. Note the default catalog may need to be
re-installed.
2016-03-24 15:10:06 +00:00
James Turner
733e3b3f0c HTTP subsystem has a default name.
Switch to using type-safe accessors now.
2016-03-24 15:08:38 +00:00
James Turner
88bfaca2b3 New options setting/clearing helpers. 2016-03-24 15:05:03 +00:00
James Turner
ff7b82885f Fix for view look-at orientation bugs.
Force a manual re-calc of view parameters inside update. Will refactor
this in the future since shouldn’t really be necessary.

Ticket: https://sourceforge.net/p/flightgear/codetickets/1855/
2016-03-24 12:26:16 +00:00
James Turner
cbf16b7966 Fix copy-paste bug setting season in the Qt guy
Spotted by Adrian Serrano!
2016-03-22 10:56:05 +00:00
James Turner
d0c341fa47 Guard against a crash. 2016-03-22 10:42:21 +00:00
Erik Hofman
209194ecba Reload user preferences after reading the video configuration file 2016-03-21 11:50:11 +01:00
Florent Rougon
0cfa4ced9c Make --metar automatically imply --disable-real-weather-fetch
The --metar option has no effect unless --disable-real-weather-fetch is
also passed. This often makes users believe that --metar doesn't work.
Change the implementation for --metar so that it automatically implies
--disable-real-weather-fetch.
2016-03-20 19:56:18 +01:00
Torsten Dreyer
585b4a7f70 Fix "failed to load file: Models/..."
After removing /Models from FGData loading of shared models from
within a scenery model failed because the ResourceManager did not know
about additional scenery paths.
2016-03-19 21:08:24 +01:00
James Turner
74f17d2882 Fix missing menubar on Mac in some setups
- Only clear the OSG ‘pose as standalone’ flag when we really show
  a dialog, as opposed to when we /might/ show.

Tested:
 - Qt build using launcher
 - No Qt build 
 - Qt build but launcher not requested
2016-03-19 14:46:11 +00:00
Erik Hofman
e1bb47bc89 Add support for Video adapter rendering presets 2016-03-19 13:10:36 +01:00
Torsten Dreyer
1bf5fe1c27 Fix for FreeBSD and a typo
Fix provided by Ganael LAPLANCHE, thanks!
2016-03-12 20:55:46 +01:00
Torsten Dreyer
a1e81a2fdc Make some more noise if (stale) fgfs.pid file exists 2016-03-08 18:37:32 +01:00
Durk Talsma
31c66226e1 AI traffic refused to take-off, because the TrafficRecord destructor would unassign an AIAircraft from it's ATC. This caused it to get stuck in front of the runway and block all other traffic.
This patch may introduce an occasional crash on exit again, because it effectively undoes commit [a972df]. I'll try to find a better fix for that later on.
2016-03-06 21:23:26 +01:00
James Turner
43b4db7ef7 Improve UI around adding aircraft dirs
- Check if the selected path, or an ‘Aircraft’ subdir,  contains
some -set.xml files, and if not, warn the user.
2016-03-05 09:35:02 +00:00
James Turner
688ae7d156 Bugfix: Qt launcher, enable variant aircraft on-disk
When mapping a URI to a QModelIndex, we were only considering the 
primary aircraft path, for on-disk aircraft as opposed to packages.
2016-03-05 09:34:16 +00:00
Torsten Dreyer
4f8cbbb204 Fix #1851, wrong type in multiplayer messages
See https://sourceforge.net/p/flightgear/codetickets/1851/
for details
2016-02-29 22:29:32 +01:00
James Turner
1aa6482a59 Fix bug #1845, closing the Qt launcher
Intercept the close event and quit the app instead of continuing to
run the main FlightGear application.

https://sourceforge.net/p/flightgear/codetickets/1845/
2016-02-24 21:50:48 +02:00
Rebecca N. Palmer
41b78ce150 Nasal security: allow reading explicit --terrasync-dir
(but not /sim/terrasync/scenery-dir - https://bugs.debian.org/780716 )
Needed for animated jetways:
https://sourceforge.net/p/flightgear/mailman/message/34870606/
2016-02-21 20:25:02 +00:00
James Turner
de959a14f3 Rename Viewer/viewer.cxx to view
- keep class and file names in sync.
2016-02-17 21:25:39 +00:00
James Turner
1515154e12 View::updateData becomes a private helper. 2016-02-17 21:25:39 +00:00
James Turner
5b81333768 View offset/target-offset props are tied
- make these View properties work like all the others, i.e
  bound and unbound when the view changes.
2016-02-17 21:25:39 +00:00
James Turner
5629cf1a8d Remove legacy ‘axes/lat’ and ‘axes/long’ props.
- only exits to support some legacy joystick hat configs,
  which have been updated to use the goal- properties directly.
2016-02-17 21:25:39 +00:00
James Turner
7b08c621b4 Make many View APIs private
- many things are now only needed by tied methods, and 
  hence can be made private.
2016-02-17 21:25:39 +00:00
James Turner
a3382fec6d Simplify setting view eye/target offsets 2016-02-17 21:25:39 +00:00
James Turner
e404ebc38a Sink more properties into View 2016-02-17 21:25:39 +00:00
James Turner
27d739084a View-manager binds like a normal subsystem.
- no longer need the unusual init-bind order
2016-02-17 21:25:39 +00:00
James Turner
00a4f1ecbb Clean up view-number property handling 2016-02-17 21:25:39 +00:00
James Turner
ae1d96cdfb Move FOV property into View 2016-02-17 21:25:39 +00:00
James Turner
daf8c79705 View-Mgr absolute position is gone. 2016-02-17 21:25:39 +00:00
James Turner
65d5038962 Tie view orientations directly
- remove need for cached orientations in view-manager
2016-02-17 21:25:39 +00:00
James Turner
3171cbce75 copyToCurrent removed. 2016-02-17 21:25:39 +00:00
James Turner
bf69781ae0 Remove dead code. 2016-02-17 21:25:39 +00:00
James Turner
fa4a5e7a64 Better types for eye/target position 2016-02-17 21:25:39 +00:00
James Turner
03d5e55b57 Move data updating into the View class 2016-02-17 21:25:39 +00:00
James Turner
7391b9d76a ViewManager::copyToCurrent is a no-op 2016-02-17 21:25:39 +00:00
James Turner
655ac851e0 Start moving view-manager logic into View
- work in progress, goal is to make copyToCurrent and most of
  the bind/unbind logic sink into each specific View, avoiding all the
  null pointer checks in view manager.
2016-02-17 21:25:39 +00:00
James Turner
8c918c6cec Make View::set_clean private. 2016-02-17 21:25:39 +00:00
James Turner
d4d2121641 View can created itself from config properties
- use in view manager
- make View constructor private
2016-02-17 21:25:39 +00:00
James Turner
02ff854603 Re-Name FGViewer to flightgear::View
- avoids confusion with osgViewer and fgviewer application.

(source files to be renamed in a follow-up commit)
2016-02-17 21:25:39 +00:00
James Turner
e60d9a191e Viewer: move camera-group to view manager
- also devirtualise many methods in FGViewer
2016-02-17 21:25:39 +00:00
Edward d'Auvergne
97f8cdaaea Fix for the particle system.
The problem was that the change to make FGScenery a standard subsystem caused
the particle OSG group to no longer be inserted into the scene graph.  The
solution was to convert the particle group to be set up as a standard branch of
the scene graph, alongside the terrain, models, aircraft, and interior branches.
The particle system is now set up as part of the init() subsystem function call,
so it is compatible with the new subsystem design.
2016-02-16 17:33:40 +01:00
Edward d'Auvergne
34daa4de0b HUD fix for MSVC math.h incompatibility with C-99 and the round() function. 2016-02-11 19:36:32 +00:00
Rebecca N. Palmer
e1d0699bdb add new QtFileDialog to avoid using Nasal in file selectors
(and hence avoid applying Nasal security rules to them)
2016-02-10 22:58:56 +00:00
Rebecca N. Palmer
16e6009255 Nasal security: give a more user-friendly error on self-check fail
https://sourceforge.net/p/flightgear/mailman/message/34701972/
2016-02-10 22:54:52 +00:00
Edward d'Auvergne
c889198d09 Redesign of the latitude and longitude formatting for the HUD.
This follows from http://thread.gmane.org/gmane.games.flightgear.devel/78650 and
resolves the sign bug https://sourceforge.net/p/flightgear/codetickets/1778/ .

Combined with a matching change to FGData, this changes the HUD formats from the
current set of 3 (note that the text in brackets is not shown in the HUD
preferences PUI dialog, but is show here for reference):

    0) Decimal degrees (37.618890N -122.375000W)
    1) Degrees, minutes (37*37.133N -122*22.500W)
    2) Degrees, minutes, seconds (37*37 08.0 N -122*22 30.0 W)

to (here the text in brackets will be shown in the PUI dialog):

    0) DDD format (37.618890N 122.375000W)
    1) DMM format (37*37.133'N 122*22.500'W)
    2) DMS format (37*37'08.0"N 122*22'30.0"W)
    3) Signed DDD format (37.618890 -122.375000)
    4) Signed DMM format (37*37.133' -122*22.500')
    5) Signed DMS format (37*37'08.0" -122*22'30.0")
    6) Zero padded DDD (51.477500N 000.461389W)
    7) Zero padded DMM (51*28.650'N 000*27.683'W)
    8) Zero padded DMS (51*28'39.0"N 000*27'41.0"W)
    9) Trinity House Navigation (51* 28'.650N 000* 27'.683W)
2016-02-10 21:49:56 +00:00
Rebecca N. Palmer
f749953493 Nasal security: don't break file dialogs
Include the directory itself when allowing reading
Don't kill the script on a denied directory read
2016-02-09 23:17:41 +00:00
Rebecca N. Palmer
74356e84f7 Nasal security: make directory() use fgValidatePath
Being able to list arbitrary directories is a privacy violation;
existing in-fgdata uses of this are all permitted paths
(i.e. not Terrasync; FileSelector doesn't use it)
2016-02-06 21:26:05 +00:00
James Turner
c72309360e Defensive handling of locales.
- Use setlocale() to ensure consistent handling of locales and
  string handling irrespective of whether or not QCoreApplication
  is invoked. Forces a the C locale for numerics and collation,
  since many pieces of FG assume this.
2016-02-02 20:44:46 +00:00
Erik Hofman
5ef3413373 Add the latest batch of JSBSim changes. Tested with the Shuttle 2016-01-29 12:23:58 +01:00
James Turner
9172a8a8a9 VS2013 fixes for some FDMs. 2016-01-27 14:00:09 +00:00
James Turner
bb9fd9defe Fix a bug with updating packages.
- always refresh the catalogs each launch, so we don’t get mismatches
  between the cached copy the and package zips.
2016-01-26 16:46:58 +00:00
James Turner
acb630095d Possible fix for Mac strncmp crashes. 2016-01-26 07:48:30 +01:00
James Turner
2677b3a226 Use target_include_directories in some places.
I didn’t know about this feature when doing the original CMake files,
we can use this to target header-file includes more precisely.

(Probably more cases exist that can be changed from global to target-
specific includes)
2016-01-26 07:48:30 +01:00
Gijs de Rooy
9e7c3c5c89 Fix #1744: disable commradio when unserviceable 2016-01-25 16:38:57 +01:00
James Turner
81792bd6d0 Adjust fg root processing order
- ensure fg-root and FG_ROOT are higher precedence than the Qt gui
2016-01-19 18:32:20 -05:00
James Turner
d81d353940 Improved fg-root control from the Qt Launcher
- add a button to the main dialog, explaining how to adjust the 
  fg-root path via the GUI
- tweak the GUI flow to support explicitly changing the path even
  when the default path is acceptable.
2016-01-18 20:06:43 -05:00
bcoconni
bf851605fb Fixed a bug which caused the solid propellant thrusters of the space shuttle to be unconditionnally ignited during the trimming. 2016-01-17 10:26:25 +01:00
James Turner
e37e0d1bcf New log class for TerraSync 2016-01-16 15:50:13 -06:00
Bertrand Coconnier
95b932e9b3 JSBSim dropped the support of the simplex trim code 2016-01-16 19:36:32 +01:00
Bertrand Coconnier
f526dcdf3a Fixed the initialization process for JSBSim models: the error message "FGTrim::calcRotation DistPlane^2 larger than sqrRadius" should no longer be issued 2016-01-16 19:32:50 +01:00
bcoconni
4d2f9e7955 Remove the error message about the property atmosphere/P-sl-psf that can't be tied 2016-01-16 13:14:51 +01:00
Torsten Dreyer
6f09b9e31e httpd: expose /fg-home and /fg-root 2016-01-13 13:25:16 +01:00
James Turner
e3fe8ae199 Log options to INFO level when processing
- ensures they occur in the fgfs.log which should aid problem
  tracing.
2016-01-12 17:33:57 -06:00
James Turner
eb0f724c13 Fix a typo breaking some takeoff-state logic. 2016-01-12 17:26:06 -06:00
James Turner
e32b02b28f Launcher: fix slot name for old-style syntax 2016-01-12 17:25:54 -06:00
James Turner
ef1fd62b4b Fix an unused variable in non-developer-warning mode. 2016-01-12 12:50:58 -06:00
James Turner
a549c8fe45 Fix unused constants in YASim 2016-01-12 12:50:44 -06:00
James Turner
c62b004438 Fix many clang errors in UIUC code
- because uiuc_warning_error always called exit(-1), it can be marked
  no return, so Clang realises that when it’s used in the ‘else’
  side of a parsing test, uninitialised variables in the enclosing
  call site are safe.

(Requires Simgear update to define SG_NO_RETURN helper)
2016-01-12 12:50:31 -06:00
James Turner
dc17b5dda2 Fix unused variable in LaRCsim 2016-01-12 12:49:14 -06:00
James Turner
a972df05dc Fix a potential use-after-free in ATC code
- when dynamics shuts down the ATC controllers, they clear their
  traffic vectors (destroying the records), but we didn’t notify
  the AI aircraft of this. Ensure the controller is cleared so
  the AI aircraft shutdown doesn’t crash.
2016-01-12 12:22:23 -06:00
Erik Hofman
508c367c5b Sync. again 2016-01-12 19:05:51 +01:00
Erik Hofman
6e1b5e9f2e Fix a singed/unsigned warning 2016-01-12 19:05:51 +01:00
Torsten Dreyer
296849cf3d Fix a bug for allowed paths
Under some conditions on my system
aircraft_paths.begin() was equal to scenery_paths.end()
This resulted in neither of them being added to read_allowed_paths
followed by failure to load Nasal scripts from the aircraft directory.

This might happen, if scenery_paths gets allocated just before aircraft_paths
in memory.
Better loop across the desired lists instead of using fancy tricks with
the iterator.
2016-01-12 11:19:26 +01:00
James Turner
0250d2ee5b Bugfix: pause works for JSBsim/Yasim again 2016-01-11 11:47:40 -06:00
Erik Hofman
f19c8ac05d Apperently maybeRestoreAircraftSelection() needs to be a slot 2016-01-11 09:46:16 +01:00
James Turner
409ffc971d Fixes to launcher aircraft delegate.
- fix some text size computation issues
2016-01-10 23:46:44 -06:00
James Turner
4396c035df Linux build fix. 2016-01-10 22:11:32 -06:00
James Turner
f2bf30bcc7 Current time of day (warp) fixes:
- sim-speed-up (a/A keys) offsets warp correctly. This means at 4x speed
  up the warp will increase by 3 seconds for one elapsed real second.
  In practice this means simulation elements timed using sim ‘current time’
  will be correctly synchronised with those using simulated elapsed time.

  (AI traffic being a prime example of this)

- warp-delta (t/T keys) is independent of frame rate, and works when
  paused. The warp-delta values in the keybindings / GUI dialog
  will need to be updated since warp-delta in now seconds-per-second,
  as opposed to seconds-per-frame.
2016-01-10 22:10:10 -06:00
James Turner
d10d279064 Launcher finds parking positions from scenery
- change launcher to examine the scenery paths and hence load
  ground-net files for airports to populate parking data.

- refactor ground-net XML parsing to use FGGroundNetwork only, not
  AirportDynamics. 

- change parenting  of GroundNetwork to Airport, since it contains
  immutable data now.
2016-01-10 16:38:01 -06:00
James Turner
4befe0e6ea Launcher: Maintain aircraft selection better
- when launching or toggling settings, try to keep the current
  aircraft selected and in-view.
2016-01-10 13:47:57 -06:00
James Turner
b0ee3f98f3 ‘only show installed checkbox’ for Qt launcher
- will be replaced when I think of a prettier UI, but this
  feature is important to have for now.
2016-01-10 12:56:46 -06:00