1
0
Fork 0
Commit graph

14428 commits

Author SHA1 Message Date
Stuart Buchanan
f5b469aee0 Set viewer-[lon|lat]-deg on initial View bind
Previously /sim/current-view/viewer-[lon|lat]-deg were set to
(0,0) when a view was bind() for the first time by the view
manager.  This cause the scenery tile cache to immediately clear
and all scenery to be reloaded.

Now these values are set correctly the first time the view
bind() is called, so the cache behaves correctly.

Also fixed what looks like a possible bug on code read where
the tiles of the current view had a very short expiry time
set.  Seems wrong.
2020-05-10 14:17:40 +01:00
James Turner
61ed9efac8 FreeBSD: Merge from fixes from martymac
These were applied to upstream PLIB, ensure they’re applied to our
fork
2020-05-09 14:22:13 +01:00
James Turner
b52d41b0c3 Allow region/local specifications of translations 2020-05-08 14:54:53 +01:00
James Turner
67af9ebc25 Fix Cmake typo, don’t quote multiple definitions 2020-05-08 14:53:09 +01:00
James Turner
fe16551cf6 Better RelWithDebInfo flags for CL.exe 2020-05-08 14:32:40 +01:00
James Turner
6b41eb69eb Lock-file dialog: allow quit-ing, make translated
Add translation macros for the text of the lock-file warning dialog,
and update the default text after some discussion on the devel list.
Also allow quiting the app, as an alternative option.
2020-05-07 16:49:50 +01:00
James Turner
fe56b8272b Windows: ensure RelWithDebInfo is fast
Default CMake RelWithDebInfo pessimizes inlining
2020-05-07 14:13:10 +01:00
Lars Toenning
da666ae83c Fix segfauls in swift service 2020-05-07 11:13:12 +01:00
James Turner
bf72e1d729 Fix for reposition crash for some users
Speculative fix for a reposition assert which Huntley is seeing:
  https://sourceforge.net/p/flightgear/codetickets/2229/

Unclear why it’s not happening for me other some other folks, but this
should logically be the correct fix. Let’s find out.
2020-05-07 11:07:47 +01:00
James Turner
522c742419 Draft version of Nasal unit-testing API
Only the in-sim version works for now, the test-suite mode is not
implemented yet. Also the test API will evolve, but should stay close
to what CppUnit defines.

Run a test file by specifying a path to nasal-test : examples will be
added to FGData shortly.
2020-05-06 15:20:26 +01:00
James Turner
ee3958f971 Skeleton work on Nasal GC test
Incomplete, but the goal is to stess the Nasal GC system by creating
and destroying large number of objects continously.
2020-05-06 15:20:26 +01:00
James Turner
a01f3442c6 Fix non-Qt build.
Thanks Huntley for the catch.
2020-05-04 21:29:23 +01:00
James Turner
ddc7baada2 Improve UI around read-only mode / lock-files
See ticket:
https://sourceforge.net/p/flightgear/codetickets/2133/

Give the user a chance to intervene, if we select read-only mode.
Offer a button to clear the lock file if it’s stale, and start in
read-write mode.

This is still evolving, but want to get some feedback on it.
2020-05-03 18:02:20 +01:00
James Turner
9d2e50fa56 Addon-config: don’t overwrite autosaved props
Fix for: https://sourceforge.net/p/flightgear/codetickets/2059/

When copying addon-config into the main property tree, skip props
which already exist and which are marked ARCHIVE, on the assumption
they came from autosave.xml.
2020-05-03 12:23:54 +01:00
James Turner
134685b527 Fix FP delegate when loading GPXs
When load a GPX route, run normal departure/arrival airport callbacks
on the delegates. (They are blocked for ‘native’ XML routes to avoid
losing SIDs and STARs)

https://sourceforge.net/p/flightgear/codetickets/2227/
2020-05-03 08:30:18 +01:00
Edward d'Auvergne
032f65e643 TestSuite: Documentation for the FG_ROOT environmental variable. 2020-05-02 14:18:43 +02:00
Julian Smith
387b61e211 src/GUI/MapWidget.cxx: don't pan map with cursor keys if /gui/map/key-pan is 0.
Allows control of autopilot with cursor keys when map is being displayed.

Default is 1, which preserves old behaviour.
2020-05-02 10:09:04 +01:00
Julian Smith
99c1612ddc src/Instrumentation/HUD/: added enable-ground-velocity-vector
Similar to enable-velocity-vector, but indicates velocity relative to ground,
rather than velocity relative to air. E.g. useful for crosswind landings.
2020-05-02 10:09:04 +01:00
James Turner
6baa55b36b Waypoint hiding support (for the A320, etc)
To support FMS which delete ‘past’ waypoints, add some helpers:
 - waypoints can be flagged as hidden, this property is exposed to Nasal
 - currentWP() accepts an offset parameter, allowing FlightPlan indexing
   to treat the current WP as index 0
 - a ‘numRemainingWaypoints()’ function on flightPlan in Nasal, again
   to range how many waypoints are left, starting from the current WP

Add some basic tests of these new features to the route-manager tests.
2020-05-01 09:28:42 +01:00
James Turner
100efeebab Quiet some noisy logging in ATC code 2020-04-30 16:22:59 +01:00
James Turner
e60d131a4e Ensure dtor is virtual 2020-04-30 16:22:59 +01:00
legoboyvdlp R
18c0613762 Replace activeTraffic iterations with a standard function 2020-04-30 16:22:59 +01:00
legoboyvdlp R
3e1dc4683b Keep revising ATC 2020-04-30 16:22:59 +01:00
legoboyvdlp R
64aa3927a7 Rename departure cue to departure queue, formatting, document ActiveRunway class 2020-04-30 16:22:59 +01:00
legoboyvdlp R
8268cdc5e0 Optimize slot checking routines so unneeded code is not run, document function 2020-04-30 16:22:59 +01:00
legoboyvdlp R
97ca43a52a Correct description of getDistanceToGo() - this returns meters, not feet. Looking at the code it appears that it won't break anything to use the wrong units, so we'll just fx the documentation to make it clear its meters 2020-04-30 16:22:59 +01:00
legoboyvdlp R
0132ddf7a1 A missing call to initializeAirports() restored; this now works. Add documentation to atcdialog. 2020-04-30 16:22:59 +01:00
legoboyvdlp R
c789687da0 Formatting, change single-use pointers to std::unique_ptr 2020-04-30 16:22:59 +01:00
legoboyvdlp R
86dae35b37 Document atc_mgr, remove method from SchedFlight 2020-04-30 16:22:59 +01:00
legoboyvdlp R
84c075a20f Make it bulk again - I don't know how it reverts 2020-04-30 16:22:59 +01:00
legoboyvdlp R
6c3828bf84 ATC/AI: SG_LOG will now use BULK for render message 2020-04-30 16:22:59 +01:00
legoboyvdlp R
4af75c4666 ATC / AI subsystem: replace iostream with SG_LOG() and make new function in SchedFlight that will create a new scheduled flight instance 2020-04-30 16:22:59 +01:00
James Turner
d2a04cecf7 Fix string category for locale 2020-04-30 16:22:59 +01:00
Bertrand Coconnier
ca8fffda3e Fixed a segfault occuring when changing the LOD ranges with a JSBSim aircraft.
Bug report and testing by Jonathan Redpath (see details in issue #276 at GitHub).

The check of FGInterface::get_agl_ft return value has been discarded a few years ago (commit 86b346) on the ground that the method was returning a meaningful altitude above ground level even if it failed.
See mailing lists discussions:
https://sourceforge.net/p/flightgear/mailman/message/32246380/
https://sourceforge.net/p/flightgear/mailman/message/32247050/

There is no indication however that the other parameters are populated with meaningful values when FGInterface::get_agl_ft reports an error. The returned `material` pointer is therefore discarded when an error is reported. Ground reactions are still processed in all cases as was decided in 2014.

Took the opportunity to initialize the `material` pointer to null, to avoid yet another problem with unitialized values.
2020-04-30 15:25:22 +02:00
Bertrand Coconnier
7f319d69ca Fixed uninitialized variables in FGPiston.
Some members were used before being initialized in FGPiston which could randomly generate invalid floating point values that could propagate to many places in JSBSim.
As a cure to the problem, all variables are now initialized to valid default values in the header (as allowed by C++11). The constructor is only expected to set the members to meaningful values.
2020-04-30 15:10:30 +02:00
James Turner
4a485adcf3 Fix crash on —show-aircraft
Change how we return, so QApplication doesn’t explode. exit() is not
a happy thing for QApplication.

Ticket:
https://sourceforge.net/p/flightgear/codetickets/2139/
2020-04-29 14:55:37 +01:00
James Turner
de0826294c Aircraft-loading: resolve symlinked dirs earlier.
This is to ensure we pass a realpath when validating Nasal / dialogs,
to fix: https://sourceforge.net/p/flightgear/codetickets/2057/
2020-04-29 12:33:25 +01:00
James Turner
954385ce0d Improve log message when fgfs_lock.pid exists
Part of addressing:
https://sourceforge.net/p/flightgear/codetickets/2133/

Still need to decide about a better GUI dialog for this.
2020-04-29 11:44:21 +01:00
James Turner
489e6abb2a Allow translation of ‘autosave migration’ dialog.
Thanks to Slawek Mikula for the suggestion, this can now be
translated.
2020-04-29 11:44:13 +01:00
James Turner
6c66126bdb I18N: fix translation of nav-cache-init dialog
Thanks to Slawek Mikula for spotting, that this was not working
correctly, now it does.
2020-04-29 11:44:09 +01:00
James Turner
6ae2c387bf Canvas: expose dirtyPixels() to Nasal 2020-04-28 14:04:40 +01:00
Erik Hofman
b96327acf7 Remove an unused header file 2020-04-28 08:36:51 +02:00
Edward d'Auvergne
d7d6aebfa3 TestSuite: Fix for the running the CanvasTests as CTests.
These are in the simgear unit test category, not the normal unit test category.
2020-04-27 21:29:56 +02:00
James Turner
fe3a27450f Fix DBus detection for Cmake < 3.6
From Saikrishan Arcot
2020-04-27 14:21:47 +01:00
James Turner
b69055ffca Fix normalization of heading-mag-deg 2020-04-27 14:21:47 +01:00
James Turner
1f07a8eba8 PUIDialog: some C++11 style clean-ups 2020-04-27 14:21:47 +01:00
James Turner
027bd7105e Fix a comment typo 2020-04-27 14:21:47 +01:00
James Turner
aae2ddd7e4 Launcher: split on non-word characters in search
This means ‘pa-28’ or ‘c-130’ will match pa28 or c130, where previously
they did not. This makes search for aircraft designations a bit easier.
2020-04-27 14:21:47 +01:00
James Turner
61808019a0 new version: 2020.2.0 2020-04-27 09:29:56 +01:00
James Turner
3c01a38c74 new version: 2020.1.1 2020-04-27 09:29:56 +01:00