1
0
Fork 0
Commit graph

14875 commits

Author SHA1 Message Date
Julian Smith
d7614c184c LiveMetarProperties::handleMetarData: increased diagnostics.
Increased diagnostics from SG_WARN to SG_ALERT, to mitigate confusion if METAR
is out of date etc.

Will add a better mechanism for reporting errors at some point.
2020-11-01 00:03:03 +00:00
Julian Smith
4ec80297bf src/Viewer/FGEventHandler.cxx: NewGUI::setStyle(): added code to rescan style files.
Changing style will reload style from filesystem, so one can edit styles and
see results without restarting fg.

Note that this duplicates initial populating of /gui/styles/ from
defaults.xml's <sim><gui>...</gui></sim> section, so it's a bit of a hack.
2020-11-01 00:02:43 +00:00
Julian Smith
43468727ad Added command 'dialog-toggle' - toggles display of dialogue.
E.g. useful for keyboard shortcuts.
2020-10-31 17:23:28 +00:00
Julian Smith
3c9fae3016 src/Aircraft/replay.cxx:loadTape(): use specified path if it ends with .fgtape.
Used to always prepend /sim/replay/tape-directory and append .fgtape. But it's
convenient to be able to specify exact path.
2020-10-31 17:23:28 +00:00
Julian Smith
e2f2299286 src/Main/options.cxx:fgOptLoadTape(): call fgOSExit() if we fail to load tape.
If user specified --load-tape then failure to load it should be fatal to avoid
confusion. It also avoids needlessly overwriting a valid recovery tape if
/sim/replay/recovery-period is set.
2020-10-31 17:23:28 +00:00
Julian Smith
bdfd42ebd4 src/Aircraft/replay.cxx: try to ensure parent dir of recovery tape.
Avoids unexpected absence of a recovery tape.
2020-10-31 17:23:28 +00:00
Julian Smith
270cada516 src/MultiPlayer/multiplaymgr.cxx: fix multiplayer replay when not connected to multiplayer server.
Previously when replaying a recording, we would not show any recorded
multiplayer aircraft if we were not connected to a multiplayer server.
2020-10-31 17:23:28 +00:00
Julian Smith
f04f902b66 src/GUI/MessageBox.cxx:modalMessageBox(): If no gui, use SG_POPUP to ensure message is printed to terminal. 2020-10-31 17:23:28 +00:00
Bertrand Coconnier
801ec1f7a6 Relax the assert when trying to clip with max < min.
Throwing an exception was too harsh. Instead the clipping is ignored and a warning message issued.
Reintroducing the commit 90a04a that has been inadvertently removed.
2020-10-31 18:06:21 +01:00
Bertrand Coconnier
53fac332c1 Fixes for OpenBSD.
Took the opportunity to switch to the more portable call 'fctnl(... O_NONBLOCK ...)' instead of 'ioctl(... FIONBIO ...)' for all UNIX-like OSes.
2020-10-31 14:29:22 +01:00
Bertrand Coconnier
bb0b69bc41 Fixes assertion failures reported by Julian smith.
These were due to the ground callback instance of FlightGear not setting the ellipse parameters of the 'contact' location. this commit make JSBSim immune to that scenario.
2020-10-31 14:11:14 +01:00
Bertrand Coconnier
388d66b6a6 Sync'ed JSBSim
Includes the following new features and bug fixes:
- The <random> function now uses C++ std::default_random_engine
- WGS84 is now used everywhere in JSBSim (previously a mix of spherical/WGS84 earcth was used resulting in inaccuracies).
- A new <planet> XML element can be used to tweak the planet characteristics (such as semimajor/smemiminor axes, gravity, etc.)
- The FGGroundCallback instance is now managed by FGInertial with a dynamic pointer std::unique_ptr<>. JSBSim was previously using a static pointer which was causing memory access failures when several instances of JSBSim were used or when an instance was replaced by a new one (the structure pointed to by the static pointer was then lost when the old instance was destroyed).
- Removed calls to exit() and replaced them by exceptions that can be caught by FlightGear (should avoid FlightGear from being ungracefully stopped by an error found by JSBSim).
- Sockets interface: replaced the usage of obsolete functions gethostbyname()/gethostbyaddr() by getaddrinfo().
- FGColumnVector3 and FGMatrix33 can now be initialized by C++ std::initializer_list
- Disable the delays implemented in some flight control components during trimming (was sometimes preventing the trim algorithm from converging to a solution).
- Fixed the magnetometer initialization (was not updated during the first 1000 time steps)
- More conversions to C++11 features (nullptr, override, std::unique_ptr<>, etc.).
2020-10-30 13:52:56 +01:00
James Turner
f4298d676f Fix for RMB/MMB interaction with picking
When RMB drag-to-look is active, ignore all other mouse downs, which
might otherwise trigger picks to start.

Ticket-Id: https://sourceforge.net/p/flightgear/codetickets/2108/
2020-10-29 23:20:48 +00:00
legoboyvdlp R
6512783996 SetupSwiftLibraries.cmake requires a global variable libEvent_target. However, while the PKGConfig variant of FindLibEvent.cmake did set this, the Win32 variant did not; therefore CMake would always fail to find libEvent, disabling Swift. Therefore I set this property, restoring proper compilation of Swift on Windows systems. 2020-10-29 21:29:13 +00:00
Automatic Release Builder
6d2f1d33d8 Launcher: fix L10N issues found by Michael D
Address parts of the issues mentioned in:
https://sourceforge.net/p/flightgear/codetickets/2386/
2020-10-29 21:21:40 +00:00
James Turner
29d171e73a Launcher: port the QQC2 check to next
Since we require QQC2 on next, make it a critical warning.
2020-10-29 21:21:00 +00:00
James Turner
e028c52e42 NavCache: fix writes to a read-only DB
When in read-only mode, we were still allowing writes during the
octree building, which is bad. Add the missing check.

Sentry-Id: FLIGHTGEAR-8F
2020-10-29 21:13:47 +00:00
James Turner
4075ea02e9 Launcher: Fix scrollbar for next 2020-10-29 21:12:36 +00:00
James Turner
0dfdf63399 Clear atomic listeners too
This is part of trying to reduce possible causes of the property
crash on shutdown.
2020-10-29 17:28:05 +00:00
James Turner
3af8d11e1b Fix for renamed file 2020-10-29 16:26:36 +00:00
James Turner
801ddc59f8 Fix for missing 2D panel
Should be back-ported to 2020.3

Sentry-Id: FLIGHTGEAR-5X
2020-10-29 16:24:53 +00:00
Automatic Release Builder
77d7476ba6 Fix route-path crashes on empty
This could be triggered by doing ‘view route’ in the launcher flight-
planning code, wit no route defined.
2020-10-29 16:24:41 +00:00
Automatic Release Builder
f8aea84541 Launcher: nicer back button.
Avoid localisation issues for the back button, by switching to an 
icon.
2020-10-29 16:24:41 +00:00
Automatic Release Builder
9855e89109 Launcher: Validate restored aircraft state on load
Otherwise a stray state can enter the logic, unless the user
re-selects it.
2020-10-29 16:24:41 +00:00
Automatic Release Builder
f0e2a297ae Launcher: Fix excessively large mouse area
The notifications catch are was blocking the summary pane; fix the
size to follow the active notifications.
2020-10-29 16:24:41 +00:00
Automatic Release Builder
d75f05d4c0 ATC_mgr fix: clear user aircraft ATC on reposition
Avoids a stale controller causing crashes after a reposition. Triggered
by C172 tutorials.
2020-10-29 16:24:41 +00:00
Automatic Release Builder
9f3f1a8f58 Launcher: Fix translation tag Michael D spotted. 2020-10-29 16:24:41 +00:00
Automatic Release Builder
5b3f0e5cbb Sentry: generate a UUID for report tracking
Because we don’t have any user-identifier, generate a UUID so that
we can filter reports by it.
2020-10-29 16:24:41 +00:00
Automatic Release Builder
f78d644a61 Launcher: fix feedback adding default catalog
When adding the default catalog from the aircraft browse tab, 
the list on the add-ons page didn’t refresh correctly.
2020-10-29 16:24:41 +00:00
Automatic Release Builder
8c371cf3bb Launcher: Separate recent-foo data by version
Since our data encoding is incompatible between 2018 and 2020, use
different settings keys so running both versions in parallel is easier.
Without this, each version screws up the data for the other.
2020-10-29 16:24:41 +00:00
Automatic Release Builder
9776c56faa Fix a crash (race condition) closing the launcher
When local aircraft scanning is slow, we can end up clearing
the locale while a scan is in progress, which crashes. Ensure we
abandon any in-progress scan when closing the launcher.

Sentry-Id: FLIGHTGEAR-CH
2020-10-29 16:24:41 +00:00
Automatic Release Builder
df42c6f026 Launcher: UI feedback for hangar migrations
Add pop-up notification when we migrate to a new version of a hangar.
Convert the ‘new version available’ message to use a pop-up
notification as well.
2020-10-29 16:24:39 +00:00
Stuart Buchanan
c71f281a58 Launcher: First Run capitalization and grammar. 2020-10-29 16:23:26 +00:00
Automatic Release Builder
3e72fb230f Sentry: block XML parse errors from the launcher
Avoid filling up the logs when the launcher parses broken aircraft XML;
wait until the user actually pick one to fly with, before reporting
XML errors.
2020-10-29 16:23:26 +00:00
Automatic Release Builder
fc037de312 NavDataCache: don’t duplicate FG_ROOT/Scenery path
Check if the path is in the list, before adding it again.
2020-10-29 16:23:26 +00:00
Automatic Release Builder
397aad1d1d Autopilot XML: Improve logging around NaNs
The current NaN message is very noisy, and not very information. Try
to improve that, to avoid filling up the logs.
2020-10-29 16:23:26 +00:00
Automatic Release Builder
e4c0e71424 Environment: Doesn’t need to be a warning 2020-10-29 16:23:26 +00:00
Automatic Release Builder
b35b8c6147 Splash screens: support more, and JPEGs 2020-10-29 16:23:26 +00:00
Automatic Release Builder
19aa0332f2 loadxml() command: add ‘quiet’ bool option
This is to avoid console/log spam from jetways.nas in particular,
which uses loadxml to probe for file existence, every 10 seconds. But
in general it seems useful to have this potentially be quiet, since
there is a result code.
2020-10-29 16:23:26 +00:00
Automatic Release Builder
378fc54b61 Launcher: first-run wording tweaks
As discussed on the devel list, also switch to HTTPS.
2020-10-29 16:23:20 +00:00
Automatic Release Builder
9de60e5729 Change error reporting for -set.xml parsing
Avoid exceptions in the ‘not actually a -set.xml’ case, since this
occurs somewhat frequently.

Sentry-Id: FLIGHTGEAR-3W
2020-10-29 16:22:35 +00:00
Automatic Release Builder
e0df583c14 Launcher: fix appearance of disabled add-ons.
Spotted by Michael Danilov
2020-10-29 16:22:35 +00:00
Automatic Release Builder
38f44e0928 Traffic: fix some crashes detected by Sentry
Sentry-Id: FLIGHTGEAR-68
Sentry-Id: FLIGHTGEAR-67
2020-10-29 16:22:35 +00:00
Automatic Release Builder
f4f261a068 Guard against data errors in rwyprefs.xml
AirportDyanmics::innerGetActiveRunway can unfortunately return an
empty string even when it return ‘true’. Check for this in the wrapper,
and switch to the fallback, to avoid returning a bogus runway to
other parts of the code.

Sentry-Id: FLIGHTGEAR-39
2020-10-29 16:22:35 +00:00
Automatic Release Builder
4ac8523bed SetupRootDialog: avoid calling exit()
This causes QApplication to become unhappy and crash, so use a
graceful exit via a new return code and FG_OPTIONS_EXIT instead.

Sentry-Id: FLIGHTGEAR-6B
2020-10-29 16:22:35 +00:00
Automatic Release Builder
582d539a1a Launcher: overhaul local -set.xml parsing
Fix the include context when -set.xml are parsed by the launcher to
extract states and other data. Ensure aircraft paths are available
and handled consistently with normal -set.xml parsing. Without this,
many -set.xmls fail to parse.

Sentry-Id: FLIGHTGEAR-4H
Sentry-Id: FLIGHTGEAR-3B
Sentry-Id: FLIGHTGEAR-3R
Sentry-Id: FLIGHTGEAR-3Q
Sentry-Id: FLIGHTGEAR-3F
Sentry-Id: FLIGHTGEAR-2R
Sentry-Id: FLIGHTGEAR-65
Sentry-Id: FLIGHTGEAR-42
2020-10-29 16:22:35 +00:00
Automatic Release Builder
2b54078023 Additional Sentry message ignores: add AC3D
These make the reports very noisy for no value.
2020-10-29 16:22:35 +00:00
Automatic Release Builder
7597887e60 Fix Sentry issue: FGCom crash on exit
FGCom was added to the wrong group, leading it to be shutdown after
FGSoundManager, and hence, after OpenAL wad closed, which causes
crashes.

Sentry-Id: FLIGHTGEAR-66
2020-10-29 16:22:35 +00:00
Automatic Release Builder
d252740307 Adjust for changed SGXMLSound API
Detect bool return value from init(), use this to allow calmer
failures. Requires corresponding SG commit.
2020-10-29 16:22:35 +00:00
Automatic Release Builder
632d5bc836 Launcher: first-run & help updates
Adjust the wording and links for these pages, after a review session
with Stuart and others. Include a link to the manual and short-ref
from the local installation.
2020-10-29 16:22:35 +00:00