1
0
Fork 0
Commit graph

11430 commits

Author SHA1 Message Date
Automatic Release Builder
0f01b0cbb6 Launcher: add help panel to instal aircraft
Based on some feedback on the tracker, when few aircraft are installed,
point users towards the 'browse' tab.
2020-10-29 14:51:12 +00:00
Automatic Release Builder
6c0cb998e3 Launcher: show sentry on/off setting everywhere
Since AppImage builds on Linux have Sentry reporting enabled, enable
the on/off UI everywhere
2020-10-29 14:51:02 +00:00
Automatic Release Builder
7ea138038e First-run page for the launcher.
Appears on first launch, gives us a chance to point out some policy
things and where to get help.
2020-10-29 14:50:49 +00:00
Automatic Release Builder
e5a9491d34 Launcher: fix local-weather warning
When a weather scenario doesn’t specify any local-weather data, we
will use METAR anyway, so remove the warning.
2020-10-29 14:50:38 +00:00
Automatic Release Builder
6178457097 Launhcer: Fix an incorrect file-path 2020-10-29 14:50:25 +00:00
Automatic Release Builder
191786d9a0 Launcher: Don't probe for states if the -set.xml is missing
This showed up as frequent exceptions from readProperties in the
launcher, when checking for states.

Sentry-Id: FLIGHTGEAR-2R
2020-10-29 14:50:13 +00:00
Automatic Release Builder
eb1d8a7dc8 Fix trafific crash that was reported.
Probably an edge case of and edge case, but let's guard for it anyway,
since it causes traffic to terminate.

Sentry-Id: FLIGHTGEAR-2Q
2020-10-29 14:49:53 +00:00
Automatic Release Builder
c75388f4b7 Sentry: white-list another libPNG warning
These are not useful for tracing, so filter them out
2020-10-29 14:47:57 +00:00
Automatic Release Builder
6e947f59eb Change MP on-runway-start message to MANDATORY_INFO 2020-10-29 14:47:48 +00:00
Automatic Release Builder
18aabbdbb5 AITraffic: workaround missing node
Avoid 'findShortestRoute' exception by checking both the start
and end nodes are valid first. Doesn't fix the error but avoids
a traffic shutdown.

Sentry-Id: FLIGHTGEAR-2F
2020-10-29 14:47:07 +00:00
Automatic Release Builder
77b6d635fe Multiplayer: change how we log activation
Use MANDATORY_INFO and set a Sentry tag when MP is active
2020-10-29 14:46:47 +00:00
Automatic Release Builder
39bc7f2acd Nasal: reduce exceptions from loadxml()
When the file path is not preset, check for this and don’t let
readProperties() fail with an exception, since this makes for very
noisy event reporting.
2020-10-29 14:46:35 +00:00
Automatic Release Builder
d803875997 Sentry: fix exception reporting formatting 2020-10-29 14:46:07 +00:00
Automatic Release Builder
063d7bf53f Move some warnings to Dev-mode
These are autopilot XML issues, so not useful for regular users.
2020-10-29 14:44:53 +00:00
Automatic Release Builder
c564c667df Sentry: avoid duplicate events for exceptions
Since fatalMessageBox already logs an event when it’s invoked, don’t
report the event a second time.
2020-10-29 14:44:40 +00:00
Automatic Release Builder
a2ba405d8e Sentry: log SimGear exception throws 2020-10-29 14:44:27 +00:00
Automatic Release Builder
d07360b37d Launcher: guard against missing data files
More robust checking that FGData is setup correctly, when we try to
parse defaults.xml from the launcher.

Relates to Sentry exception:
https://sentry.io/organizations/flightgear/issues/1901193353
2020-10-29 14:44:08 +00:00
Automatic Release Builder
db4e71955e Sentry: track compositor on/off 2020-10-29 14:42:24 +00:00
James Turner
dfcae619cf Crude startup logging.
To diagnose startup hang, will revert once we have fix the issue.
2020-10-29 13:44:59 +00:00
James Turner
58f0b4a16a TimeManager: expose the speed=up factor nicely 2020-10-29 13:44:59 +00:00
James Turner
423c754009 Reposition: tolerate more scenarios in ATC_mgr
When starting at an airport, but not at parking or a runway, create
an empty AIFlightPlan, and ensure the AIManager code doesn’t choke on
empty FPs.

Add a unit-test which simulates the C172 tutorial reposition logic,
which is a little gnarly.
2020-10-27 18:32:18 +00:00
Erik Hofman
46435edf19 The fixed 60 degrees offset at EHAL turned out to be the lattitude offset (actually 53.45 degrees): The moon seems to be dragging the tide with an almost perfect 45 degrees 'bow-wave' along the equator. 2020-10-27 08:31:54 +01:00
James Turner
7510f7d487 AI Fix a crash where a valid flightplan is assumed
Sentry-Id: FLIGHTGEAR-GX
2020-10-26 16:03:29 +00:00
James Turner
f2a108945d Expose version number parts in the header
This will avoid strutils::split to extract these values.
2020-10-26 16:03:29 +00:00
Erik Hofman
f24da5ac3d Fix tide levels to match th reported ones exactly, for today and months ahead 2020-10-26 10:24:33 +01:00
Erik Hofman
9a54ff575c Fix the calculation of the moons longitude since the moon does not specify xs but xg instead. This required a nasty strcmp of the body name so switch to parsing a boolean instead and convert to strings when required. 2020-10-26 10:23:54 +01:00
James Turner
afb43edbdf Make EDDF procedures work better.
Allow mis-match of STAR and approach, which is necessary for EDDF
operations. When there’s a mismatch, just route the common section
and don’t try to build a STAR -> approach transition.

Fix by Tobias Dammers.
2020-10-25 20:31:53 +00:00
James Turner
a21c0f9c16 Groundnet parsing: Fix exception for missing value
Sentry-Id: FLIGHTGEAR-CJ
2020-10-25 20:14:10 +00:00
James Turner
358fb70ee0 Catch XML errors parsing traffic files
Sentry-Id: FLIGHTGEAR-EQ
2020-10-25 20:14:10 +00:00
James Turner
fd630b6d37 Traffic: adjust failure of for reachedEndOfCruise
When reachedEndOfCruise fails, return true, so we trigger the next
phase of the flight. Without this we get stuck logging the error
message, but not progressing the flight.
2020-10-25 20:14:10 +00:00
James Turner
4bbff581f3 Fix crash in flight-plan UI
Sentry-Id: FLIGHTGEAR-ES
2020-10-25 20:14:10 +00:00
James Turner
3b01aaf33f Fix crash with missing airport in ATC
Sentry-Id: FLIGHTGEAR-ER
2020-10-25 20:14:10 +00:00
James Turner
e0bd74e982 RouteManager: validate changes to current-wp
Since FlightPlan::setCurrentIndex throws, ensure we validate the value
coming from the property before setting it.

Sentry-Id: FLIGHTGEAR-71
2020-10-25 20:14:03 +00:00
James Turner
4c3aa8b484 Check for missing file in several places
Replaces a ‘missing tag at line 1’ error with a simpler ‘file not
found’ message.

Sentry-Id: FLIGHTGEAR-5X
2020-10-25 20:01:57 +00:00
James Turner
9ebbfb90af Traffic: Fix crash in createTakeoff
Likely relates to repositioning, and a stale ‘active runway’ value.
2020-10-23 15:40:33 +01:00
Erik Hofman
029ad744b2 base the tides on the viewer, moon and sun longitude for an accurate prediction. 2020-10-22 20:44:42 +02:00
Erik Hofman
3e75668194 Remove references to unused functions 2020-10-22 15:26:51 +02:00
Erik Hofman
ef8dc106ce Explicitly set the daylight-saving time flag to zero since we specify in GMT 2020-10-22 12:02:28 +02:00
Erik Hofman
f3e47ef3b7 Switch to make_unqiue 2020-10-19 14:49:07 +02:00
Erik Hofman
23252df726 Move tide calculations from FGLight into it's own subsystem 2020-10-19 14:28:56 +02:00
Erik Hofman
5fcbd46d53 Switch to more modern C++ 2020-10-18 11:24:45 +02:00
James Turner
497636c3dc Fix for Linux build 2020-10-15 16:17:30 +01:00
Bertrand Coconnier
4049acd84e Bump the protocol version because Chris Speck's changes broke the backward compatibility. 2020-10-02 21:30:54 +02:00
Florent Rougon
8985626ad5 Fix LaRCsim build errors
The previous commit (88c2b7a83) used '#if ENABLE_UIUC_MODEL' instead of
'#ifdef ENABLE_UIUC_MODEL' in a few places, causing a build error.
2020-09-30 16:45:11 +02:00
Erik Hofman
88c2b7a833 Make LaRCsim work again when UIUC is dissabled. Unfortunately only the c172 seems to be stable. The Navion and Cherokee fail to trim at the runway. 2020-09-30 15:39:30 +02:00
Florent Rougon
b1b12a924f Simplify NavDataCache::NavDataCachePrivate::findDatFiles()
- Use a range-based for loop instead of an iterator.

- Don't bother checking if the previously-visited directory was the
  same: the potential saving that the previous code was hoping should be
  null because FGGlobals::append_fg_scenery() doesn't add a path to
  FGGlobals::fg_scenery if it's already there---this assumes that all
  paths added to FGGlobals::fg_scenery go through
  FGGlobals::append_fg_scenery(), of course.

This should have no effect on FG's behavior.
2020-09-30 11:09:44 +02:00
Erik Hofman
56d4662468 Next big step: proper ground reactions. Also make it possible to run fgfs --aircraft=aisim --aero=<aircraft> for different aircraft configurations (which requires an upcoming update to FGData 2020-09-25 13:19:10 +02:00
James Turner
5329c4024b Sentry experiment: record warnings/alerts
This means that when a crash/exception occurs, we can see the preceding
warnings and alerts. Not sure if this will really help, so giving it
a test.
2020-09-18 10:34:40 +01:00
James Turner
d56e3857b6 Fix sentry setting of dist
Was missing header and string conversion, oops.
2020-09-18 10:14:23 +01:00
James Turner
3b5b301e98 Launcher: Disable Qt 5.15 QML warnings 2020-09-17 21:45:39 +01:00
James Turner
aea0a1a12a Sentry: set dist (build) data 2020-09-17 21:45:39 +01:00
James Turner
3a69e20248 Reduce the default log-level for the launcher. 2020-09-14 11:05:46 +01:00
James Turner
cae06a79b7 Attempt to fix crash-on-exit seen for Windows
Can’t reproduce this crash but it’s happening for some users on Windows,
so this should either fix it, or make the problem more obvious. Let’s
see.

https://sentry.io/organizations/flightgear/issues/1890563449
2020-09-14 11:05:46 +01:00
Erik Hofman
f2a96eaa6c Stabilize the forces and moments, clean up the code some more 2020-09-10 11:41:06 +02:00
James Turner
4fc0948dbf Fix Windows compilation 2020-09-08 21:51:57 +01:00
James Turner
e26a2ecab0 Crash:harden against malformed menu bar entries
If a menu-bar item is missing a <name>, we can end up building a string
from nullptr, which is a SEGV.

Reported as Sentry issue FLIGHTGEAR-1D

Will back-port to LTS once verified.
2020-09-08 14:01:39 +01:00
James Turner
830a890eff Tests: skeleton ViewManager/Views tests 2020-09-08 12:31:42 +01:00
James Turner
1fe82206a0 Make view subscripting more robust
Trying to fix a crash raised by Sentry
2020-09-08 11:23:14 +01:00
James Turner
395a3e70e9 Logging: use new MANDATORY_INFO level.
Requires corresponding SG commit.
2020-09-08 10:59:29 +01:00
Erik Hofman
abb8ce0120 AISim: Implement a JSON configuration file reader, fix gear positions and engine thrust calculation. 2020-09-07 11:48:38 +02:00
James Turner
e46c6f587b AIFlightPlan: remove ‘erase’ option from Decrement
Thankfully, the erase option to DecrementWaypoint was never used, so
remove it, since it’s … mental.
2020-09-05 11:16:36 +01:00
James Turner
f802e09c57 ASan: QtMessageContext doesn’t copy file names
Use the ‘file name copying’ version of log(), to avoid an ASan use-
after-free. Note this requires SG change 
 908496d43dd7c3a7ca1de42b0e0c21aa0498c7df
to work correctly.
2020-09-05 10:44:43 +01:00
Slawek Mikula
c9d1d58146 [Launcher] #2316 - fixed sorting in the aircraft grid/listview.
When there are installed the same aircrafts from different sources 
(fgdata + fgaddon + git) with identical descriptions, use the URI to
provide stable sorting.
2020-09-05 10:44:43 +01:00
James Turner
f5b5828bd0 AIFlightPlan: add test for XML parsing
This meant some slight refactoring to expose some easier APIs for
testing, but the normal methods should be unaffected.
2020-09-05 10:44:43 +01:00
James Turner
3a3ff07883 Start testing FGAIFlightPlan 2020-09-05 10:44:43 +01:00
Erik Hofman
0272a4fa3f Merge branch 'next' of ssh://git.code.sf.net/p/flightgear/flightgear into next 2020-09-04 16:03:39 +02:00
Erik Hofman
a95aaab0f4 use in-place declarations and clean up the code a bit 2020-09-04 16:03:04 +02:00
James Turner
2147eb8da9 Missed fixes from previous Yasim commit. 2020-09-04 13:05:11 +01:00
James Turner
d2fb16e071 Fix mismatched new/strdup/delete[] froub by ASan
See: https://sourceforge.net/p/flightgear/codetickets/2367/ for the
issue. Switch to using std::string instead of char*, and hence any
need to manually free the memory.
2020-09-04 12:41:56 +01:00
James Turner
4402d7b81d NavCache: only remove if the file exists.
Otherwise we block trying to re-create the cache, which is dumb. This
showed up as Sentry issue:
https://sentry.io/organizations/flightgear/issues/1875854826

Will back-port to 2020.2 once verified.
2020-09-04 12:29:45 +01:00
James Turner
1fd5502e9b Nasal removecommand: use a return value
Change removecommand() to indicate success or failure via a return
value: 1 for success, 0 for failure.
2020-09-04 10:56:41 +01:00
Erik Hofman
c6cb845f90 Merge branch 'next' of ssh://git.code.sf.net/p/flightgear/flightgear into next 2020-09-04 11:45:33 +02:00
Erik Hofman
6bd87586b0 Fix stability: CL and CD must be negative 2020-09-04 11:44:37 +02:00
Erik Hofman
e8fe8345bf Start using or own types for vectors and matrices for sharter and more readable code. Fix some sign issues 2020-09-04 10:58:18 +02:00
James Turner
9090d91be3 Fix a missed pu.h rename. 2020-09-03 20:25:14 +01:00
James Turner
61c6cfb050 AIAircraft: fix type of non-Swift aircraft 2020-09-03 17:51:40 +01:00
James Turner
d1fc4b58cb Start creating tests of AIModel code
First test just creates the manager, and ensures the user aircraft
updates in sync with the real aircraft.
2020-09-03 17:51:40 +01:00
Erik Hofman
ce1e85f656 Get the AISim FDM in a semi-flyable state 2020-09-03 14:39:38 +02:00
Erik Hofman
bdc66d5535 Rename our own version of pu.h to FlightGear_pu.h per James advice. Remove inclusion of pu.h where it isn't requirted. 2020-09-03 12:56:01 +02:00
Erik Hofman
0451816a82 Add our own version of pu.h and use it to prevent bug #2362 on all systems. This can be done since pu.h is to be considered in code freeze forever anyhow. 2020-09-01 10:12:42 +02:00
Scott Giese
ad2bf3cd09 Revert "Resolve Deprecation Warnings"
This reverts commit 8cede3f065.
2020-08-30 17:58:36 -05:00
Scott Giese
7b914bc5fb Removed unreachable code 2020-08-29 11:20:40 -05:00
Scott Giese
a87d9ca76f BezierNode: logic error in initialization 2020-08-29 11:03:31 -05:00
Scott Giese
532d879f72 Dead code removal 2020-08-29 11:00:55 -05:00
Scott Giese
e079f0d1eb Resolve warnings: comparison between unsigned and signed types 2020-08-29 10:15:02 -05:00
Scott Giese
8cede3f065 Resolve Deprecation Warnings 2020-08-29 10:12:35 -05:00
James Turner
37d820120d Unit-testing: tests for Nasal SGCommand API
Test adding/removing/invoking commands, and error handles when
duplicate adding and removing a command name.
2020-08-26 17:20:58 +01:00
James Turner
66f938be8e Sentry: fix naming clash. 2020-08-26 15:29:55 +01:00
James Turner
a882b75c9b Sentry: fix fatal-error event type. 2020-08-26 13:57:44 +01:00
James Turner
5dbab6e90e CMake: overhaul how we find 3rd-party files
Handle the standard windows-3rd-party setup (used by fgmeta) with no
extra options, and also handle the slightly odd setup we use on Jenkins.
Try to tolerate all permutations of setting MSVC_3RDPARTY_ROOT to 
different places in the hierarchy.

We no longer try to guess Boost_INCLUDEDIR by looking at parent dirs of
MSVC_3RDPARTY_ROOT, since this seemed kind of bad to me. Let’s try 
it and see.
2020-08-26 13:57:24 +01:00
Automatic Release Builder
9d775cdfe7 Fix duplicate init of Sentry on reset 2020-08-26 09:52:16 +01:00
Automatic Release Builder
73b4c3839d Sentry: more breadcrumbs 2020-08-26 09:52:09 +01:00
Automatic Release Builder
d9b7435dab Sentry logging of exceptions, fatal errors 2020-08-26 09:52:02 +01:00
Automatic Release Builder
bade1ec4c6 Attempt to fix ref-ptr crash on exit
Fixing Sentry issue FLIGHTGEAR-9
2020-08-26 09:51:55 +01:00
James Turner
06b026a218 GUI/knob animation: fire release binding over PUI
Fire the release bindings for active pick callbacks, even for a ‘handled’
mouse release. This means knobs, etc will fire their release binding
if the mouse is over a PUI dialog.

https://sourceforge.net/p/flightgear/codetickets/2347/
2020-08-25 20:48:29 +01:00
James Turner
8a1109160b Fix Nasal ‘removecommand’ so it actually works. 2020-08-25 19:23:43 +01:00
James Turner
cf424e4344 Rename buildId header file
Avoid the very common name ‘build.h’ in favour of something clearer
and FlightGear specific.
2020-08-24 15:05:16 +01:00
James Turner
178d1beb80 Cmake: Remove version.h machinery
Merge this file into config.h, this means we can save an include path
everywhere.
2020-08-24 15:04:24 +01:00
James Turner
6dfbda9bd1 Cmake: ifx abuse of OBJECT libraries
Use STATIC intermeidate libs for these pieces, to keep older CMake
versions happy.
2020-08-24 13:19:57 +01:00
James Turner
11932bac4e Trying to fix EnvironmentManager shutdown crash.
Not sure this will fix it, but it’s the only scenario I can spot so far,
so let’s try anwyay.

Reported at Sentry as: FLIGHTGEAR-8
2020-08-24 10:25:09 +01:00
James Turner
4fe8a118cc Traffic: Improve iterator robustness
Attempting to fix Sentry crash FLIGHTGEAR-B, crash on shutdown. Not
sure this is quite right, but the logic is clearer and we handle
invalid iterators better.
2020-08-24 10:23:50 +01:00
James Turner
95fd692af1 CMake: move install() rule for compatability
Older CMake versions can’t install(TARGET…) from a different directory.
2020-08-23 21:50:36 +01:00
James Turner
476b9eb3d1 Ensure OSG headers are founding building the UI 2020-08-23 21:10:56 +01:00
James Turner
f7dc02d009 Fix Swift build with CMake 2020-08-23 11:31:37 +01:00
James Turner
218df89b29 Embedded resources: better cmake command
Use add_custom_command and an intermediate OBJECT library to avoid
rerunning fgrcc unless the XML input file has actually changed.
2020-08-23 11:31:37 +01:00
James Turner
47ff3e9f67 Improve CMake strucutre 2020-08-23 11:31:37 +01:00
Scott Giese
63d3dd4cbd REVIEW: Memory Leak - FLITEVoiceSynthesizer ctor
1,696 bytes in 4 blocks are definitely lost in loss record 6,145 of 6,440
2020-08-23 00:21:11 -05:00
Scott Giese
0ce2fdf190 REVIEW: Memory Leak - PositionedOctree.cxx
1,728 bytes in 36 blocks are still reachable
1,280 bytes in 8 blocks are still reachable
480 bytes in 3 blocks are still reachable
2020-08-23 00:15:42 -05:00
Scott Giese
dc1519bfe8 REVIEW: Memory Leak - screensaver_control
2,056 bytes in 1 blocks are still reachable
352 bytes in 1 blocks are indirectly lost
320 bytes in 1 blocks are still reachable
2020-08-22 22:59:33 -05:00
Scott Giese
f84a522f12 REVIEW: Memory Leak - FGPUIMenuBar::add_enabled_listener()
3,920 (3,136 direct, 784 indirect) bytes in 98 blocks are definitely lost
2020-08-22 22:22:47 -05:00
Scott Giese
9d6239031f REVIEW: Memory Leak - wxRadarBg::init()
4,096 bytes in 1 blocks are indirectly lost
2020-08-22 21:48:52 -05:00
Scott Giese
6c14eaa6e8 REVIEW: Memory Leak - FGLinuxEventInput::postinit()
4,995 (40 direct, 4,955 indirect) bytes in 1 blocks are definitely lost
2020-08-22 21:26:03 -05:00
Scott Giese
8e9e16bac6 REVIEW: Memory Leak - Branch::childAtIndex
9,152 bytes in 52 blocks are still reachable
2020-08-22 18:01:15 -05:00
Scott Giese
f21eb3a484 REVIEW: Memory Leak - Options ctor
15,768 bytes in 219 blocks are still reachable
2020-08-22 17:23:55 -05:00
Scott Giese
14b28d4f72 REVIEW: Memory Leak - FGLinuxEventInput::posinit()
55,004 (40 direct, 54,964 indirect) bytes in 1 blocks are definitely lost
2020-08-22 17:05:35 -05:00
Scott Giese
91f8b4dbef REVIEW: Memory Leak - ClipboardX11 ctor
55,397 (104 direct, 55,293 indirect) bytes in 1 blocks are definitely lost
2020-08-22 17:00:24 -05:00
Scott Giese
9d4a940bc0 REVIEW: Memory Leak - wxRadarBg::init()
277,296 (16 direct, 277,280 indirect) bytes in 1 blocks are definitely lost
2020-08-22 16:53:10 -05:00
James Turner
94ff2f8ee4 Load APT1000 comm frequencies correctly.
See discussion in:
https://sourceforge.net/p/flightgear/codetickets/2336/
2020-08-19 11:48:50 +01:00
James Turner
5b3cdb49c5 Sentry: add breadcrumb on scenery reload 2020-08-19 11:47:34 +01:00
Automatic Release Builder
bbce95b5ea Updates for sentry.io 0.4.0 API 2020-08-18 16:51:27 +01:00
Automatic Release Builder
439c5bf4f4 Adjust how we enable/disable Sentry.io
This allows for crash-reporting in the launcher,
but still disabling via default.xml or the command line.
2020-08-18 16:51:21 +01:00
James Turner
a297c89144 Flightplans: add clearAll, rename clear -> clearLegs
Improve naming of clear() methods, and expose the new ones to Nasal.
this will allow RouteManager dialog ‘clear’ button to clear all, soon.

See ticket:
https://sourceforge.net/p/flightgear/codetickets/2064/
2020-08-17 16:11:10 +01:00
James Turner
06a14b4b27 Fix a use-after-free ASan spotted. 2020-08-17 16:05:20 +01:00
James Turner
09067eecda Protocols: additional Hz rate validation
Patch by Huntley Palmer, to warn when passing Hz=0 for the protocol
args, which does not work so well.
2020-08-17 12:15:40 +01:00
James Turner
86f6b94300 Use new thread-safe particles manager.
Requires corresponding SG commit
2020-08-17 10:00:42 +01:00
James Turner
2295e82a0f Fix a use-after-free found by ASan. 2020-08-17 10:00:42 +01:00
Stuart Buchanan
51173f32ff Additional AI Aircraft properties for animation
Add a number of properties set by both AI Traffic and Swift aircraft:

gear/gear[0..5]/position-norm
surface-positions/flap-pos-norm
surface-positions/spoiler-pos-norm
surface-positions/speedbrake-pos-norm
controls/lighting/beacon
controls/lighting/cabin-lights
controls/lighting/landing-lights
controls/lighting/nav-lights
controls/lighting/strobe
controls/lighting/taxi-lights

Also improve take-off behaviour
2020-08-16 14:49:33 +01:00
James Turner
06e6883396 Call new simgear clearSharedTreeGeometry
Should remove the Final Effect (TM) and fix one source of memory
corruption on reset.
2020-08-14 16:47:02 +01:00
James Turner
095be63be4 Reset: Add some missing prop clears on unbind 2020-08-12 16:38:10 +01:00
James Turner
977bfb06bf Reset: ensure mobile tacan drop its AI references
Add a slightly ugly hook, to force mobile nav records to drop their
refs into the property tree on reset.
2020-08-12 16:37:52 +01:00
James Turner
51bb8ed5ce GUI: clean PUI junk on GUI shutdown 2020-08-12 16:36:22 +01:00
James Turner
5d2bb87601 On shutdown, the renderer might already be gone.
Check for this when trying to remove the event handler.
2020-08-12 15:33:20 +01:00
James Turner
16ae171333 Fix a read of freed-data when closing props channels
Ensure we close all channels, before the NetPoller is destroyed, to
avoid a use-after-free.
2020-08-12 15:32:52 +01:00
James Turner
a05e5075b2 FGCom: explicit init some member variables
Fix various places Valgrind identified as read-of-un-inited. Also
fix use of frequencies are integers: always use a double type explicitly,
which will make MSVC happier.
2020-08-12 15:32:02 +01:00
James Turner
d6a0dadf45 Windows build fixes
std::for_each needs <algorithm>
2020-08-11 19:20:32 +01:00
James Turner
56089b9dd9 Fix clean up of the PUI event handler on reset 2020-08-11 18:44:41 +01:00
James Turner
c913b752fc Improve reset main-loop interaction.
Actually remove our main-loop properties, and clear them from the
EventHandler, so we don’t report them as leaked properties.
2020-08-11 18:44:29 +01:00
James Turner
3b5721d77e Fix leaking of dynamics/AI traffic
Use a weak-ref for ParkingAssignment to refer to its owning dynamics,
to avoid a circular dependency.
2020-08-11 18:43:24 +01:00
James Turner
fa76d5b158 Fix errors with missing runways at KORD
This likely relates to stale runway preferences data.
2020-08-11 18:43:20 +01:00
James Turner
21629402ce ATCManagers: Use modern subsystem retrieval 2020-08-11 18:43:14 +01:00
James Turner
250669f75a Fix circular ownership in FGFX
FGFX isA SGSampleGroup, but owns some SGXmlSounds, which also take an
owning ref to their sample group. Clear out the XMLSounds on unbind(),
to break the circular reference.
2020-08-11 14:06:15 +01:00
James Turner
f8fcc8ff5d Default (XML) electrical system: fix leaks
Ensure shutdown of the electrical system actually cleans up components.

Fixes some leaks and dangling properties on reset.
2020-08-11 14:05:10 +01:00
James Turner
b4df97beb6 Fix a crash with clicks on reset 2020-08-11 14:03:55 +01:00
James Turner
fff2fa1718 Raw-pointer -> smarter pointer in TileMgr
Not fixing any leaks, just making ownership more explicit.
2020-08-11 11:44:29 +01:00
James Turner
e2e5223784 Fix leak of FGTerrain on shutdown
This fixes us leaking all STG objects on shutdown, due to an errant
raw pointer in the scenery layer.
2020-08-11 11:16:30 +01:00
Hans Kunkell
4743ede3b3 generates io channel names and adds to property tree 2020-08-10 10:49:09 +01:00
Hans Kunkell
2992e1b100 implements reinit of IO channels 2020-08-10 10:27:51 +01:00
Scott Giese
04a5c37a55 Memory Leak - Fixed
60,200,752 (59,468,656 direct, 732,096 indirect) bytes in 285,907 blocks are definitely lost in loss record 15,499 of 15,501
2020-08-07 12:28:15 -05:00
Richard Harrison
ab1ecb0a31 Directional point light (triangle) changes
Ensure that there are listeners on the properties as the scene features needs to be kept up to date with the properties.
2020-08-07 12:05:57 +02:00
Scott Giese
75e28368ea Memory Leak: 57 MB
60,200,752 (59,468,656 direct, 732,096 indirect) bytes in 285,907 blocks are definitely lost in loss record 15,499 of 15,501
2020-08-06 22:01:15 -05:00
James Turner
b04a0d74f6 Use new-style sub-system lookup 2020-08-05 15:15:17 +01:00
James Turner
379748fc6b Remove obsolete terraSync code 2020-08-03 17:57:59 +01:00
James Turner
f40c6187fb Launcher: omit some setup for in-sim mode
Unfortunately this doesn’t fix the weirdness reported in:
https://sourceforge.net/p/flightgear/codetickets/2180/ 
.. but will keep trying.
2020-07-30 12:30:23 +01:00
James Turner
ebdf34e81a Launcher add-ons: tweak display of missing version
Show missing min/max FG version as ‘-‘ to avoid a translation headache.
Thanks to Slawek Mikula for the suggestion.
2020-07-30 12:29:06 +01:00
legoboyvdlp R
d6b7eaf60f Fix that tp_type will return nil for transitions 2020-07-30 12:26:04 +01:00
legoboyvdlp R
668b499ff4 Correct restrictions above and below. Add test case. Fix contributed by Tobias Dammers 2020-07-30 12:25:02 +01:00
James Turner
25d88573d1 Launcher add-ons styling fixes
Suggested by Slawek Mikula, thanks!
2020-07-29 20:43:37 +01:00
Chris Speck
932938cbee Send fuel tank capacity, fuel density and level in m3 2020-07-29 20:13:07 +01:00
Florent Rougon
3300ac543e Print missing --data path in the "fatal message box"
As suggested by Slawek Mikula:

  https://sourceforge.net/p/flightgear/codetickets/2164/#c397
2020-07-28 10:25:25 +02:00
Stuart Buchanan
3fc1bdff45 Fix W/S ground net position strings. 2020-07-26 20:20:28 +01:00
legoboyvdlp R
3255105190 Ensure that cruise parameters are set when cloning flightplan 2020-07-22 11:31:07 +01:00
Lars Toenning
cdacea1315 [swift] Fix coding style 2020-07-21 11:57:58 +01:00
Lars Toenning
d78b19546a [swift] Add parts support 2020-07-21 11:57:53 +01:00
James Turner
3893754537 Refactor dynamics lat/lon parsing
Using C++11 idioms, and avoid conversion to C strings for atof
2020-07-21 11:52:32 +01:00
James Turner
f5f3054a7a Launcher: Fix cast of helipd to runway
Should fix trying to retrieve an ILS from a pad.
2020-07-17 12:04:12 +01:00
James Turner
ae094f9a77 Nasal: fix valgrind error in print/logprint
Requires matching Simgear change.
2020-07-17 12:03:28 +01:00
James Turner
2f4b2153ef Fix test: find airways.
Fix handling of ‘both’ level option in several places, and amend
the test to make it explicit that we want Clacton VOR, not NDB.
2020-07-16 11:28:50 +01:00
James Turner
ae5b17920c Launcher: Fix a missed translation tag 2020-07-16 09:21:33 +01:00
James Turner
9df688659e Remove redundant line from prior commit. 2020-07-16 09:18:34 +01:00
James Turner
dc4201ed9f Launcher: improve hit-testing of helipad
Use the other circle only, for hit testing pads in the airport diagram.
2020-07-15 09:52:02 +01:00
Florent Rougon
f105e8dfb2 Improve locale handling
- fgfs --language=fr-FR now works as expected for the launcher (also with
  --language=fr_FR as before): the value added by option --language to
  the _languages member of FGLocale is normalized in "underscore" style
  (e.g., fr_FR).

- Add-on translations must now use a hyphen in their property node names
  in addon-metadata.xml (talking about children of <localized>): i.e.,
  use for instance <fr-FR> there, not <fr_FR>. An exception
  (addons::errors::error_loading_metadata_file) is thrown if one of
  these nodes has a name containing an underscore.
2020-07-14 12:23:23 +01:00
James Turner
54264e6591 Add —disable-gui option
Prevents showing a GUI message box if the user wants to run from the
console.

As requested here:
   https://sourceforge.net/p/flightgear/codetickets/2306/
2020-07-14 12:05:53 +01:00
James Turner
f9e9dbf309 Fix naming of Traffic PerformanceDB props
Use correct spelling and splitting of names, but keep reading the old
values as well, for backwards compatibility.
2020-07-14 11:24:42 +01:00
James Turner
1c1a41ed22 Remove an obsolete comment 2020-07-13 14:29:20 +01:00
James Turner
3993fc7d35 Launcher: fix helipad selection
Helipads were not being shown for convention airports, only for
heliports. Fix this up so helipads work alongside runways at
conventional airports, when the selected aircraft is a helicopter.
2020-07-13 14:29:20 +01:00
James Turner
b08de513d0 Launcher: show helipads and runways for airports
Where an airport (as opposed to heliport) has helipads, show them
as well in the diagram.
2020-07-13 14:29:20 +01:00
James Turner
f5c70e01b0 Launcher: fix detection of seaplanes and helis. 2020-07-13 14:29:20 +01:00
James Turner
ece20db882 Fix helipad runtime type definition
This broke various places trying to detect helipads vs runways.
2020-07-13 14:29:20 +01:00
James Turner
faa211bf5d Launcher: cap the search history at 20 items. 2020-07-13 14:29:20 +01:00
Florent Rougon
37aba7dbd4 Remove unused code and fix typos 2020-07-11 13:22:33 +02:00
James Turner
0bb9600795 Add-ons localization support
Add-on meta-data can be localized now, in the same manner as aircraft
metadata.
2020-07-09 18:14:56 +01:00
James Turner
f0d3663102 Nasal unit-testing: allow deep struct equality.
Add a deep comparison of vecs and hashes, when deciding equality in
test assertions.
2020-07-08 15:22:27 +01:00
Stuart Buchanan
2bb15866b8 WS3.0 AirportBuilder update to use Effects. 2020-07-07 13:09:34 +01:00
James Turner
c71fc5ae73 Fix missing File menu in Dutch translation
Set the menu action roles to avoid the text heuristic, which erroneously
confuses our configuration menu items with preferences and moves them.

Fixes bug:
https://sourceforge.net/p/flightgear/codetickets/2253/

Will pick to 2018.3, 2020.1 and 2020.2 since it’s nicely self-contained
and rather annoying.
2020-07-04 14:38:38 +01:00
James Turner
73c15c4d5c Improve a method name, as suggested by Florent 2020-07-03 12:34:37 +01:00
James Turner
9e00715079 Allow cmd line & add-ons to supply FGData extensions
Allow add-ons to define an FGData subdir, and support multiple —data=
command line arguments, to avoid the need to modify FG_ROOT (which might
be read-only). Allow additional data paths to be either higher or lower
priority than FG_ROOT, so that add-ons cannot replace files in FG_ROOT.
2020-07-03 12:29:21 +01:00
James Turner
f97ea1f621 Fix route-path hiding of waypoints
Also hide the path, if the preceding waypoint is hidden. Fixes the
route-manager test JonathanR added.
2020-07-02 12:19:19 +01:00
Stuart Buchanan
39cedd1256 Fix fgviewer for Compositor 2020-07-01 21:02:16 +01:00
Stuart Buchanan
c4942eaa69 AirportBuilder to generate airports from apt.dat 2020-07-01 20:57:15 +01:00
James Turner
bb75d24fc0 Make the launcher defensive about bad add-ons
Tolerate missing add-on data if a bogus add-on is added by the user.

https://sourceforge.net/p/flightgear/codetickets/2266/
2020-07-01 11:57:04 +01:00
James Turner
736485ab76 Expose a Nasal FP method under a better name
Match the C++ name for this, not sure why I ever though pathGeod was a
good name for this.
2020-06-30 17:09:55 +01:00
legoboyvdlp R
cd5a0ffe0b Expose totalDistanceNm to Nasal flightplan ghost
Requested by Tobias Dammers, includes associated test. 
May be cherry-picked to 2020.2.
2020-06-30 13:30:35 +01:00
Scott Giese
034c9f4c86 VPB: Initial Commit
Not for LTS
2020-06-28 11:34:37 -05:00
James Turner
de89d72593 Keep more old log files
Suggested on the tracker, keep log files around longer. Currently we
keep the previous ten files.

Note we still don’t log for secondary running copies, since this would
violate the ‘only one copy can write to FGHome’ principle.

https://sourceforge.net/p/flightgear/codetickets/2243/
2020-06-26 10:13:13 +01:00
James Turner
4a568a42e4 Tweak a log-level 2020-06-25 11:03:08 +01:00
James Turner
05e40bfde3 Log-to-file level can be raised to debug/bulk
Fixes ticket:
https://sourceforge.net/p/flightgear/codetickets/2100/
2020-06-25 11:01:52 +01:00
James Turner
ee6f4388ee Change how fatalMessageBoxThenExit works
This avoids crashing when using Qt : we cannot call exit() safely since
QGuiApplication won’t shut down correctly. Instead throw a special
marker object and catch this in boostrap.

For an instance of this, see:

https://sourceforge.net/p/flightgear/codetickets/2070/
2020-06-24 15:48:02 +01:00
Julian Smith
222a96503d src/FDM/YASim/yasim-test.cpp: added options to calculate settings at zero overall lift.
-D shows speed and drag values at fixed altitude.

--aD shows best speed at different altitudes.

Example:
    yasim fgaddon-git/Harrier-GR3/Harrier-GR3.xml --aD
2020-06-24 07:32:41 +01:00
James Turner
b85f2aba5c Launcher: margin tweaks suggested by Slawek
Use a margin on all the vertical scrolled lists, for text readability

https://sourceforge.net/p/flightgear/codetickets/2268/
2020-06-23 23:21:01 +01:00
James Turner
c07a4c2df9 Launcher: improve local -set.xml scanning
Fix some more cases found by LarsT, where -set.xml scanning would
failure due to include paths.
2020-06-23 23:13:43 +01:00
James Turner
3883b19556 Remove use of unary_function, binary_function
Preparing for switch to C++17
2020-06-22 10:25:51 +01:00
James Turner
425a2f4fe3 C++ version fixes for C++17 support 2020-06-22 10:25:51 +01:00
James Turner
39a2d270fc Fix some macOS 10.12 SDK deprecation warnings 2020-06-22 10:25:51 +01:00
James Turner
a9f48ce130 Fix some file/class name violations.
Ensure the file-name matches the class within, to avoid confusing
people more than necessary.
2020-06-22 10:25:51 +01:00
James Turner
7d7b7b3bd1 Launcher: if user has favorites defined, show them.
Suggested by Henning, that if the user has defined favorite aircraft,
default to that tab.

Will pick to 2020.2 once verified.
2020-06-22 10:25:51 +01:00
Julian Smith
59a7d50fb1 src/Main/fg_init.cxx: add support for auto-generated tooltips on animations.
Results in tooltips for instrument needles, and control surfaces.

Enabled with /sim/rendering/automatic-animation-tooltips/enabled.
The max number of auto-created tooltips can be specified in
/sim/rendering/automatic-animation-tooltips/max-count (too many can cause
problems, e.g. on 777 i had to set max to 45).

src/Model/acmodel.cxx:fgLoad3DModelPanel(): pass new property values to
simgear::SGModelLib::loadModel(), so we can have auto-created tooltips for
animations in the user's aircraft.

[This all requires matching changes to simgear.]
2020-06-20 19:09:12 +01:00
Julian Smith
5af966cfcc src/Scripting/NasalSys.cxx: use override in SimNasalLogFileLine. 2020-06-20 19:09:12 +01:00
Julian Smith
eddd042dbf src/Instrumentation/HUD/HUD.cxx: removed unnecessary newline in SG_LOG() text. 2020-06-20 19:09:12 +01:00
Julian Smith
b35bf51fa0 src/Scripting/NasalSys.cxx: Optionally prefix all Nasal output with Nasal file:line.
Depends on /sim/nasal-log-file-line. E.g. enable with:

    --prop:/sim/nasal-log-file-line=1.
2020-06-19 20:45:11 +01:00
Julian Smith
9e610af55d Added some #includes of Qt headers that were missing.
We get away with things without these includes because
the build concats lots of C++ files together into
build/flightgear/src/GUI/fglauncher_autogen/mocs_compilation.cpp and luckily
earlier ones had the right includes.
2020-06-19 20:45:11 +01:00
Julian Smith
0506a72b30 Improved handling of continuous replay and added recovery system.
Continuous replay:
    If the user replays a continuous recording from file and then end replay
    with the 'My controls' or 'End replay' buttons, we now forget about the
    continuous recording. This enables the usual in-memory record/replay to be
    used subsequently. Also added a '-continuous' suffix to continuous fgtape
    filenames.

New recovery system:
    If /sim/replay/recovery-period is set and greater than zero, we
    periodically save a single-item continuous recording to a recovery file
    called <aircraft-type>-recovery.fgtape (with no date or time in the name),
    doing so in such a way as to ensure that there is always a valid recovery
    file even if flightgear crashes. One can then resume the flight from the
    most recently-saved point by loading this from within flightgear or with
    the --load-tape=... option.

Also did a fair amount of refactoring and tried to clarify the different
property nodes that we embed within recordings.
2020-06-19 20:44:26 +01:00
James Turner
4e12748b8c Fix some compiler warnings 2020-06-19 10:46:01 +01:00
James Turner
5a11e57d0a I18N: support localised local aircraft strings
Allows us to localize aircraft names/descriptions, especially for the
UFO and C172
2020-06-19 10:45:47 +01:00
James Turner
bd666f952e Raise minimum OSG version to 3.4.1 2020-06-18 17:39:48 +01:00
James Turner
06e0924bfc Remove checks for older Qt versions 2020-06-18 13:23:26 +01:00
James Turner
cc798bf21a Launcher: use built-in QQC2 ScrollBar
The built-in has some nice features and generally updates better than
my previous verion.
2020-06-18 13:20:02 +01:00
James Turner
7313f62353 Qt 5.9: drop overlay for Shortcut support
Now we required 5.9, can use this everywhere
2020-06-18 13:03:35 +01:00
James Turner
112d1028bf I18N: fix behaviour when defaultLocale == current 2020-06-18 12:57:30 +01:00
Julian Smith
4e855c3182 src/Scripting/nasal-props.cxx: avoid gcc initialisation warning. 2020-06-17 22:46:42 +01:00
Julian Smith
03537a85d7 src/Network/: fixed gcc warnings and use snprintf. 2020-06-17 22:46:42 +01:00
Julian Smith
a4457d995b src/Main/options.cxx: fix gcc initialisation warnings and minor reformat. 2020-06-17 22:46:42 +01:00
Julian Smith
aeb75738ed src/Instrumentation/: use sizeof in snprintf. 2020-06-17 22:46:42 +01:00
Julian Smith
61aaf44495 src/Input/FGHIDEventInput.cxx: fix gcc comparison warnings. 2020-06-17 22:46:42 +01:00
Julian Smith
037db25e29 src/GUI/FGQQWindowManager.cxx: fix gcc warning about initialiser. 2020-06-17 22:46:41 +01:00
Julian Smith
8ae21d86dd src/GUI/FGFontCache.cxx: fix gcc warning about initialiser. 2020-06-17 22:46:41 +01:00
Julian Smith
fd30fe0e68 src/FDM/LaRCsim/ls_interface.c: use snprintf(). 2020-06-17 22:46:41 +01:00
Julian Smith
50ef1cf337 src/FDM/ExternalPipe/ExternalPipe.cxx: avoid gcc warning. 2020-06-17 21:11:29 +01:00
Julian Smith
a00e9e571d src/Airports/: fixed some minor warnings and use snprintf. 2020-06-17 21:11:29 +01:00
Julian Smith
be3329e4b4 src/Aircraft/flightrecorder.hxx: use unsigned to fix gcc warning elsewhere. 2020-06-17 21:11:29 +01:00
Julian Smith
6007327da9 src/ATC/trafficcontrol.cxx: fix some minor warnings. 2020-06-17 21:11:28 +01:00
Julian Smith
778c81a9b5 src/AIModel/: fixed warnings about use of const with no affect. 2020-06-17 21:11:28 +01:00
Julian Smith
001c1d231d If multiplayer record is enabled, carry on recording while replaying.
This background recording keeps the user aircraft stationary while recording
all movements of multiplayer aircraft. Allows one to look at replay without,
for example, disturbing continuous record to file.
2020-06-17 21:10:33 +01:00
Julian Smith
15915b5a79 Added support for continuous uncompressed save to file.
This allows full-fidelity recordings of arbitrary length (limited only by disc
space) to be created and replayed. These recordings always contain multiplayer
information, regardless of /sim/replay/multiplayer.

When an uncompressed recording is loaded, it is not copied into memory. Instead
we extract individual frame information as required when replaying.

Recording to file is activated by setting /sim/replay/record-continuous to
true. We use the same filename pattern as ordinary fgtapes. The file format
is similar except for being uncompressed (so that replaying can seek within
the recording; gzip etc don't seem to support seeking within the uncompressed
stream.)
2020-06-17 21:10:33 +01:00
James Turner
dbec99abc9 Translate weather scenarios names+descriptions
Allow weather scenarios to be translated, and display this in the
launcher.
2020-06-17 16:15:01 +01:00
James Turner
38cccc3f62 Bugfix: empty popup menus in the launcher
Propagate the display role to the overlay menu correctly.
2020-06-17 16:12:37 +01:00
James Turner
7948a135b6 Launcher: load aircraft with odd -set.xml includes
Lars T identified some cases where the launcher would fail to include
local aircraft due to them using weird ways to include additional
XML into their -set.xml. Add a temporary resource provider while the
launcher is scanning, to make this work.

Will pick to LTS branch once verified.
2020-06-17 11:51:16 +01:00
James Turner
00d34b67e1 Fix translation of migration-notification dialog.
Was being shown before locale was selected, so always using default
translation. Fixed by deferring the dialog, and also added an assert
for debug builds, if trying to access translated string too early.
2020-06-17 10:57:34 +01:00
Lars Toenning
42ed210c9c Add warning if *-set.xml couldn't be parsed for launcher 2020-06-16 22:48:26 +01:00
James Turner
46084c59ff Splash: fix a missing translation Slawek spotted
Allow the ‘% completed’ text to be translated.
2020-06-15 18:42:02 +01:00
James Turner
c8a88f7c40 Fix some missed translation markers for Add-ons
See: https://sourceforge.net/p/flightgear/codetickets/2163/

Thanks to Slawek for spotting these.
2020-06-15 12:24:57 +01:00
James Turner
1d97267663 Fix crash on shutdown in FGFontCache
Reported here by Michael:
https://sourceforge.net/p/flightgear/codetickets/2114/
2020-06-12 11:26:20 +01:00
James Turner
dce282d7b8 Rename js.h -> FlightGear_js.h
Ensure we don’t get weird conflicts as our internal version is
starting to diverge from the original PLIB one.
2020-06-11 17:48:49 +01:00
James Turner
00cffc2f01 Allow correct re-init of joysticks on macOS
With this change, “Reload Input” will discover newly attached devices
on macOS, which previously did not work.

Also add correct detection of disconnected devices, which previously
was not handled well, especially with the new ‘keep trying to open
devices’ behaviour of FGJoystickInput.

Should fix:
https://sourceforge.net/p/flightgear/codetickets/2259/
2020-06-11 17:43:55 +01:00
James Turner
9326c88f9b Move Qt root path variable to top-level CMakeList 2020-06-10 17:59:09 +01:00
James Turner
c1afb053a1 Fix flight-plan cloning with approach transitions 2020-06-10 17:58:31 +01:00
James Turner
bce6b56c8d Remove use of QQ.Window / PopupTracker
Overlay menus work better than native popups for most use-cases, and
simplify integration (no window focus changes). Switch the remaining
menus to always use the overlay system

As part of this, fix how Overlay positions are adjusted, to avoid
the ugly zero-interval timer.
2020-06-10 16:54:27 +01:00
James Turner
aedaf798c0 Launcher: add key shortcut for Fly!
Ctrl-F, since we don’t have a find function.

Requested by Richard, and easy to add :)
2020-06-09 14:53:43 +01:00
Julian Smith
43130aa581 Fixed splash download statistics to use 'B' for bytes rather than 'b'.
'b' usually means bits.
2020-06-09 10:43:15 +01:00
James Turner
6278e74e4b Fix MSVC build: include <atomic>
(Weirdly, only needed with some MSVC versions…)
2020-06-09 08:43:14 +01:00
James Turner
2574783656 ATC: Fix crash with missing traffic ID
https://sourceforge.net/p/flightgear/codetickets/2254/
2020-06-08 22:44:52 +01:00