1
0
Fork 0
Commit graph

11468 commits

Author SHA1 Message Date
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
James Turner
32ff21c1df UI: support OSG multi-threading modes, partially
Requires private header, so might need an additional package installed
on some Unixes.
2020-06-08 22:44:52 +01:00
James Turner
2ca06d5b69 Launcher: move PNGs to assets/ subdir 2020-06-05 22:16:02 +01:00
James Turner
3cd3ad465e Add Qt dialog state controller
Allow standard control of drill-down dialogs (with back / forward
navigation)
2020-06-05 22:09:03 +01:00
James Turner
faa070307d Add property Qt item-model
Allows exposing a set of property nodes as a model in combo boxes,
lists, etc.
2020-06-05 22:09:03 +01:00
James Turner
c2c3bc17f6 Expose child-props to QML binding class 2020-06-05 22:09:03 +01:00
Julian Smith
edb5be38ee Multiplayer replay: add support to fgtape recordings. improved replay behaviour.
Fgtape:

    If multipayer replay is active we write multiplayer packet information to
    fgtape files. We also add /sim/replay/multiplayer to the properties written
    to fgtape file so at load time we knows whether to expect multiplayer
    packets.

    New builds of fg can load and replay old recordings.

    It is expected (but has not been tested) that old builds of fg will be able
    to read new fgtape recordings where /sim/replay/multiplayer was unset or
    false (currently the default).

    Old builds of fg will not be able to load fgtape recordings that include
    multiplayer data.

Avoid incorrect removal of multiplayer aircraft when replaying:

    We now clear multiplayer motion history when we jump forwards or backwards
    during replay. This ensures that multiplayer code doesn't remove
    multiplayer aircraft because of inconsistent-looking time stamps.

    We preserve some multiplay information when purging recorded information
    to save space. This ensures that when replaying we get frequent enough
    packets to avoid the multiplayer code thinking that multiplayer aircraft
    have disappeared.
2020-06-05 21:21:14 +01:00
Julian Smith
4de00657c9 Multiplayer replay: added properties showing memory usage info. 2020-06-05 21:21:14 +01:00
Julian Smith
e7b1f3f52e Multiplayer replay: new, support for replaying multiplayer aircraft as well as the user's aircraft.
At the moment this only works for live replays - we don't (yet) write the
multiplayer information to fgtape files.

Enable with:
    --prop:bool:/sim/replay/multiplayer=true

This works by copying all raw multiplayer packets into a buffer in
FGMultiplayMgr. Each time it is called, FGFlightRecorder::capture() moves all
the available packet from this buffer into its FGReplayData. Thus we store
roughly syncronised multiplayer packets along with the user aircraft's detailed
replay properties.

When replaying, FGFlightRecorder pushes packets into a buffer in
FGMultiplayMgr, which are used instead of live multiplayer packets. [Actually
when replaying FGMultiplayMgr still reads live packets in order to handle live
chat messages, and ignores chat messages from FGFlightRecorder.]
2020-06-05 21:21:14 +01:00
James Turner
0015744486 Nasal unit-testing feedback from Henning 2020-06-05 21:00:59 +01:00
James Turner
033a53f1d7 Add missing code to previous commit :) 2020-06-05 20:49:05 +01:00
James Turner
a9e5a27e55 UI handling tweaks
- add class to handle top-level windows
- remove requirement to use custom graphics-window
- order alongside PUI UI
2020-06-05 17:54:27 +01:00
James Turner
6beeea2bd5 Nasal flight-plans: allow clearing transitions
When nil is set on the _trans members, clear the transition value
internally. Also fix an error message.
2020-06-04 17:54:13 +01:00
James Turner
023fbe35ea Tweaks to avoid a crash when asking for FGData path
exit(-1) early in startup seems to cause QApplication to be cleaned
up in a weird way
2020-06-04 17:43:27 +01:00
James Turner
9cc9a8a197 Add ‘makesingleshot’ helper to Nasal.
Makes a timer object, but set to single shot mode and starts it.
2020-06-01 11:16:37 +01:00
James Turner
26b0148747 Preserve developer-mode on reset
Thanks to Henning for pointing out problem.
2020-06-01 11:15:45 +01:00
James Turner
13bb1adf54 Better fix for orientation nodes init
(Avoid the chance that we overwrite a value set earlier)
2020-05-31 12:24:36 +01:00
James Turner
c0d347859f Ensure various properties have a value on start.
Ensure /orientation/heading-magnetic-deg, etc have a type of double
immediately. Showed up as a bug in the SenecaII, since the property
is created but has NIL value until the first update() call.
2020-05-31 12:18:07 +01:00
James Turner
03563a1601 Fix DME intercept handling in route/GPS
Both the route-path cade and the RNAV code were using some bad logic
to compute the intersection point. All fixed now, but requires a
new helper in Simgear.
2020-05-30 15:59:07 +01:00
James Turner
e51a0c55b5 Fly-by support for Radial intercepts
In the common case, avoid an overshoot when doing radial
intercepts.
2020-05-30 15:59:07 +01:00
James Turner
6bb1478067 GPS fly-by support
Remove the non-functional turn-anticipation code from the GPS, and
enable fly-by mode in (some of the) RNAV controllers: initially the
leg controller.

The new config property is gps/config/enable-fly-by, defaults to off
for compatibility.
2020-05-30 15:59:07 +01:00
James Turner
58d7454976 Explicit support for approach transitions
Make the handling of approach transitions consistent with SID and STAR
transitions, including the Nasal API. Add some tests to cover the
new features.
2020-05-27 21:44:59 +01:00
James Turner
55ce199535 Fixes for cloning FPs with procedures 2020-05-27 16:09:18 +01:00
Bertrand Coconnier
9ed2406878 [JSBSim] Actuator <lag> elements can now be specified by either a value or a property.
Thanks to Sean McLeod for the patch.
2020-05-27 15:48:41 +02:00
Stuart Buchanan
d852308dc6 Nasal library load order
Previously, the Nasal files in fgdata/Nasal/*.nas were loaded in
file-name order.  This created a particular problem file files
beginning with "a" which might want to use props.nas.

This adds support for an ordered list of files to be defined
in the property tree that will be loaded before the rest of the
Nasal files.
2020-05-25 19:45:40 +01:00
James Turner
0423524b82 Fix crash on first-run on macOS 2020-05-25 14:13:21 +01:00
Lars Toenning
265d721bab [swift] Transfer connection settings to defaults.xml
Related to commit d0cb2f on fgdata
2020-05-24 14:15:27 +01:00
James Turner
54f660764e Tests: change how we find+load data files
Avoid encoding test-data as strings, since this exceeds MSVC limits
on string literals, and tests don’t need to be relocatable anyway,
so we can just hard-code the source location into config.h
2020-05-24 14:14:35 +01:00
James Turner
f242d1a226 Fix case sensitivity of Compositor spec names
https://sourceforge.net/p/flightgear/codetickets/2249/
2020-05-24 08:53:25 +01:00
James Turner
ce6bd859b3 Add Nasal source location to unit-tests 2020-05-22 17:35:24 +01:00
James Turner
3576f5ab3e Split NasalPositioned in two
File was getting huge, break it in half.
2020-05-22 16:38:53 +01:00
James Turner
d66edf42f5 Expose new index-of-interest FP methods to Nasal
Add some test checks for the Nasal API as well
2020-05-22 15:52:54 +01:00
James Turner
1eef7300be PosInit: fix a crash with invalid park-pos.
Add test-cases for this,
2020-05-21 23:19:39 +01:00
Lars Toenning
f3edffd42b Exit on startup if defaults.xml is corrupted 2020-05-21 22:49:57 +01:00
James Turner
fffcd14362 Fix FlightPlan procedure transition handling
Overhaul how transitions are stored in FlightPlan XML, and how
they’re exposed to Nasal. Simplify the Nasal access by making
‘sid_trans’ and ‘star_trans’ writeable.

Extend the unit-tests a lot to cover this, both from C++ and also
from Nasal

As part of this, overhaul the ownership of FlightPlan delegate
factories, to make it safer (use ref-counting of the factories,
and allow the factory to customise delegate clean-up behaviour)
2020-05-21 22:32:28 +01:00
James Turner
5f5a9d2a5e Fix RNAVProcedureTests::testIndexOf
Make FlightPlan::findIndexOfWp use the correct ::matches() method,
and special case this for basic waypoints. This fixes the behaviour
when loaded routes / procedures store a navaid-waypoint as basic.
2020-05-19 22:24:07 +01:00
James Turner
2759977ab6 Fix Launcher compositor setting 2020-05-19 22:22:04 +01:00
James Turner
8af20fbcab Fix for loading of FGFP plans.
Where the plan does not contain departure / arrival WPs, fire the
corresponding delegate methods after load, to run the selection logic.

Also, add a ‘loaded’ delegate callback, to give delegates a chance to
perform validation and fix-up after all flight-plan loads.
2020-05-19 22:01:42 +01:00
James Turner
63fe5237c6 Improve interaction of —parkpos and repositioning
Re-work how position-init and ATC-manager work together to do
parking assignment and fallback (when the parking is unavailable).
Improve the logic for the reposition case, and teach ATC-manager about
reposition explicitly.

When the parking is unavailable, explicitly fall back to best-runway
selection in finalizePosition.

Add many additional position-init tests, to cover all of this.
2020-05-19 18:00:34 +01:00
Bertrand Coconnier
1c10ccdd61 [JSBSim] Added a new property "accelerations/Nx".
Completed the set of properties accelerations/N{x,y,z}.
2020-05-18 23:00:36 +02:00
James Turner
1cf8e5641c Fix testing version of previous commit. 2020-05-18 11:47:11 +01:00
James Turner
645548cbcc Launcher: ensure cache rebuild dialog stays open.
Disable the auto-close behaviour, which was causing us to end the
rebuild too early, and then corrupt the DB
2020-05-18 11:46:17 +01:00
Lars Toenning
91263fc873 [swift] Initialize/cleanup traffic module correctly 2020-05-14 11:13:26 +01:00
Lars Toenning
7b9940f1b1 [swift] Code cleanup 2020-05-14 11:13:26 +01:00
Lars Toenning
f823e033f1 [swift] Use AIManager for swift aircrafts 2020-05-14 11:13:26 +01:00
James Turner
f010e78e55 Launcher: basic Compositor support 2020-05-14 10:57:16 +01:00
James Turner
0c0947458f NavCache init: make progress updates smoother 2020-05-13 15:51:42 +01:00
James Turner
31c66b3a37 Use QApp::exec to run the nav-cache init dialog.
This avoids an issue where the dialog doesn’t update on macOS, if it’s
shown immediately after a native message box, such as the migration
warning dialog.
2020-05-12 22:00:43 +01:00
James Turner
620a02bad3 Make sentry APi key customisable 2020-05-12 12:01:59 +01:00
James Turner
fec454def9 PUI map: disable key-bindings for now 2020-05-12 11:26:07 +01:00
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
b52d41b0c3 Allow region/local specifications of translations 2020-05-08 14:54:53 +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
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
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
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
Scott Giese
5b12b1f360 Revert "Fix HUD scale"
This reverts commit 93a1d5e2d1.
2020-04-26 21:56:07 -05:00
James Turner
d17c1bbaf2 Merge /u/kaklik/flightgear/ branch next into next
https://sourceforge.net/p/flightgear/flightgear/merge-requests/197/
2020-04-25 15:34:37 +00:00
gallaert
99083d6b35 Replace boost::tuple by std::tuple 2020-04-22 14:06:13 +01:00
gallaert
f7cbcd9e60 Replace boost::function by std::function 2020-04-22 14:06:13 +01:00
gallaert
27ae79b5da Replace boost::bind by std::bind and lambda function 2020-04-22 14:06:13 +01:00
gallaert
4854607382 Replace boost::lexical_cast by std::ostringstream and std:stof/stoi/stod 2020-04-22 14:06:13 +01:00
gallaert
c6124b5c5a Replace boost::enable_if/disable_if/enable_if_c/disable_if_c by std::enable_if 2020-04-22 14:05:47 +01:00
gallaert
0dfed0a096 Replace boost::shared_ptr/weak_ptr by std::shared_ptr/weak_ptr 2020-04-22 14:05:46 +01:00
James Turner
381919451d Fix for reset crash:
https://sourceforge.net/p/flightgear/codetickets/2217/

This requires a matching Simgear change, but ensure all places
tolerate Nasal subsystem being gone, since this occurs during reset.
2020-04-22 10:56:54 +01:00
James Turner
858fc6ea01 Launcher: Fix compilation with Qt < 5.6 2020-04-21 16:34:24 +01:00
James Turner
b85048db2d GPS/FLightPlan test updates
- fix reseting of the NavData each test
- improve the test-pilot’s GPS following (reduce turn range close
   to the desired course)
- test DME intercepts
2020-04-21 15:48:41 +01:00
James Turner
fdd509a080 Logging for Nasal errors, disabled for now.
Code to log Nasal, as well as C++, errors. But need a way to reduce
the false-positive rate, so disabled for now.
2020-04-20 11:03:35 +01:00
James Turner
17774dbe4c FlightPlan: DISCON works with pointAlongRoute
Add some tests for the default GPS / route-manager handling of
DISCON in flight-plans. Especially check behaviour when sequencing
a DISCON, and resuming with a Direct-to after one. 

This requires a corresponding FGData update to the default GPS Nasal.
2020-04-19 16:44:49 +01:00
James Turner
1a925b152d FlightPlan: don’t assert on invalid waypoints
When there is no first anchor waypoint (eg a runway or navaid), avoid
asserts from the RoutePath code.
2020-04-19 12:27:50 +01:00
Stuart Buchanan
682293c0d0 Fix for C++11 using simgear::strutils::lowercase 2020-04-18 22:00:04 +01:00
James Turner
d96d903c0b Sentry: fix conversion of Build-ID to string 2020-04-18 18:13:37 +01:00
Stuart Buchanan
1d6b6d9753 Add carrier parking positions to property tree
This adds the names of the available parking positions/catapults
to the property tree, so we can build a suitable in-sim list
of parking positions for users to select from.
2020-04-18 18:07:25 +01:00
jano
dc1bc21d2f Manufacturer code added to the igc file
to make gpsbabel accept our igc files, added the manufacturer code , wich should
 be the first line in igc file, as stated page 35 in :

https://www.fai.org/sites/default/files/igc_fr_ts_2016.pdf
2020-04-18 13:36:04 +02:00
Stuart Buchanan
52a6245b49 Add --carrier-position command line argument
Takes special values "FLOLS" and "abeam" to set up
aligned for final approach or at the 180 for the carrier flight
deck.  Or alternatively a catapult or parking position.
2020-04-17 20:25:18 +01:00
James Turner
faee5dbabf Code changes for crash reporting with Sentry. 2020-04-17 17:55:34 +01:00
James Turner
a24301f746 UI for enabling crash-reporting in the launcher 2020-04-16 22:33:37 +01:00
James Turner
7986999650 Nasal: add _toggleBoolValue helper for Henning 2020-04-16 16:41:18 +01:00
James Turner
e939e877dc Nasal isInt : handle LONG property type 2020-04-15 16:14:24 +01:00
James Turner
4c0965e3c1 Some initial tests for route discontinuities.
Probably many more to add, but this is some basic testing at least of
inserting, querying and removing discontinuities.
2020-04-15 16:11:33 +01:00
James Turner
fa898e7cd6 Add _adjustValue helper to Nasal-props 2020-04-15 11:24:32 +01:00
gallaert
8da16eddd6 Replace boost::to_lower and boost::to_upper by strutils::lowercase and strutils::uppercase 2020-04-14 13:26:53 +01:00
James Turner
81ba646111 Add some type-checking helpers to Nasal.Props 2020-04-14 13:26:29 +01:00
James Turner
e1d00509c7 Enable sentry linkage (for Jenkins)
Note this require a sentry-native build with this commit applied:
0c631f6ec7
2020-04-14 11:15:40 +01:00
James Turner
264451246e Add compositor text to splash, if enabled
This will be removed post 2020.2 release, so not worrying about
translation of this.
2020-04-14 11:13:56 +01:00
Erik Hofman
2fd0877824 Only load the video settings when the autosave file is not found. This requires the properties in the video settings configuration file to have the archive attribute set but it solves the problem of loading the autosave file twice (and too late in the process) 2020-04-13 17:03:37 +02:00
James Turner
ba08eee096 Hopefully fix MSVC205 build
Tested 2017 which works fine, but 2015 seems unhappy, hopefully this
fixes it.
2020-04-13 14:40:08 +01:00
James Turner
d7398866c7 Launcher: allow ‘Airports’ when adding a scenery path
Adjust the warning message to allow for ‘Airports-only’ scenery paths
to be added.
2020-04-13 09:35:52 +01:00
Stuart Buchanan
9b20c08db3 Fix compiler warnings 2020-04-12 21:52:19 +01:00
Stuart Buchanan
6ab7c08aa5 Fix --heading for --ndb position option.
Previously setting an offset for an NDB start position
resuled in any --heading setting being ignored.  This fixes it.
2020-04-12 21:45:20 +01:00
Richard Harrison
bf85a2d542 Fixes to static LOD ranges 2020-04-12 21:34:41 +02:00
gallaert
fb65f64342 Replace BOOST_FOREACH by C++ 11 for range loop. 2020-04-12 14:40:36 +01:00
gallaert
36f8036ce1 Statements following return, break, continue, goto or throw will never be executed. 2020-04-11 22:07:15 +01:00
Vit Hanousek
30528a9d6c Merge branch 'master' into electric-engine 2020-04-11 09:15:21 +02:00
Jakub Kákona
2247badaa6 coding style improvements according to ticket #595. 2020-04-10 23:49:22 +02:00
James Turner
4571769ee7 Quiet some log messages 2020-04-10 19:12:10 +01:00
James Turner
440ca82bca Launcher: fix a bug setting combo box state
Fix for callsign broke settings where the default value of setting is
not that of the control.
2020-04-10 19:09:54 +01:00
James Turner
6bed3fc4dd Autopilot: fix duplicate call to bind()
This fixes an error where the ‘serviceable’ property is tie()-ed twice.
The actual AP components don’t use bind (and aren’t created until init(),
so this only affects the serviceable property.
2020-04-10 13:54:30 +01:00
James Turner
4fd59a6613 Launcher: fix a glitch in restoring callsign
The base version of setValue used the wrong syntax, causing callsign
restoring to fail.
2020-04-10 11:58:18 +01:00
James Turner
0a6fe33bc3 Add support for compatible-fg-version in -set.xml
This is to evaluate if this is a good idea, not sure if we actually
want to commit to this approach yet.
2020-04-10 10:40:32 +01:00
James Turner
9304bcc9af Change some warnings to developer mode. 2020-04-10 10:40:32 +01:00
James Turner
ef76bb3064 MP startup: exclude parking positions as hold-shorts
Only consider actual taxi nodes, not parking positions, as potential
hold-short locations, when doing an MP runway-start relocation. This
avoids some odd behaviours for groundnets which only define
parking positions and nothing else.
2020-04-10 10:40:32 +01:00
James Turner
54ff853454 Fire listeners on metar-properties
Mark these as listener-safe, to reduce Nasal warnings.
2020-04-10 10:40:32 +01:00
James Turner
b1395a86ba Add —disable-hold-short option for MP
Allow explicit disabling of the hold-short behaviour when it causes
problems.
2020-04-10 10:40:32 +01:00
Richard Harrison
b8f28d54c6 Carrier init:
As well as "FLOLS" in the runway allow it in the parkpos; probably we should rename this to "position" rather than "parkpos"
2020-04-10 00:06:00 +02:00
James Turner
c78e6fb443 Nasal: expose SG log levels as constants
This avoids the need to use integers as the first argument to logprint()
in Nasal, which is confusing. Add global constants LOG_INFO, LOG_WARN,
etc.
2020-04-09 13:59:37 +01:00
James Turner
11fb8b8c84 Minor C++11 modernizations in NavDisplay.cxx 2020-04-09 12:04:40 +01:00
James Turner
b1df2ad88a Fix a 0 -> nullptr 2020-04-09 09:55:42 +01:00
James Turner
f5b04684cf Disable linking to sentry for now, due to a bug
Discovered na upstream issue in sentry-native’s exported CMake targets,
at least on macOS. Disabling until I hear back from them.
2020-04-08 16:07:31 +01:00
James Turner
785436abf4 Nasal: support for unregister FP delegates 2020-04-08 12:27:31 +01:00
James Turner
2500534b1e Build changes for new crash-reporting system. 2020-04-07 09:38:13 +01:00
Stuart Buchanan
00fd5fbaec Carrier "abeam" position support
Support for --carrier-abeam option, which places the aircraft
at the end of a downwind opposite the FLOLS.

Add launcher support for above.

Add carrier display for launcher showing position relative to
carrier.
2020-04-05 23:13:32 +01:00
Vit Hanousek
cc8b981301 Fix const attribute at eletric motor 2020-04-05 19:49:17 +02:00
Stuart Buchanan
dc6fb53596 Correct defaults FLOLS angle from 3 to 3.5 degrees
Adjusted to match the FLOLS model and code.

On carrier approaches 0.5 degress makes a surprising
level of difference!
2020-04-04 18:03:20 +01:00
Stuart Buchanan
5d75933bac add /fdm/yasim/respect-external-gear-state
Previously YASim set /controls/gear/gear-down during startup
depending on whether the aircraft was on the ground or in the air.
As YASim initialization takes place after the overlay is applied,
this over-rode any setting from the overlay.

This change adds a property which can be used by an overlay to
ensure that its /controls/gear/gear-down configuration is not
over-ridden.
2020-04-04 14:55:51 +01:00
Julian Smith
26168e5175 src/GUI/FavouriteAircraftData.cxx: add #include of <memory> to fix compile error. 2020-04-04 11:19:46 +01:00
James Turner
e596eb3716 Launcher: move favourites to its own storage class
This allows viewing/changing favourite-ness from the details view.
2020-04-04 09:20:23 +01:00
James Turner
330422faf3 C++ modernisation tweaks 2020-04-04 08:06:15 +01:00
James Turner
42a8adb07e Traffic: use new-style subsystem lookup 2020-04-04 08:06:15 +01:00
James Turner
1d8cad58db Mouse input: tidy some logic 2020-04-04 08:06:15 +01:00
Richard Harrison
cb08eb6d6d Fix for range animations in the scenery
Reinstate lod/rough and lod/bare and therefore fix the use of range animations that implement hardwired LOD.

Initially I was reluctant to do this - but after a lot more research I'm no longer convinced that range animations cause a huge performance hit and so we can keep this fix until either the scenery is fixed or the situation becomes clear.

Ideally this fix should be reviewed prior to the next LTS release; or maybe after the next LTS release - but in future reviewed it must be
2020-04-04 00:55:12 +02:00
Stuart Buchanan
e0fb27037b Carrier launcher: Usability improvements
- Support for <description> under <entry> in AI scenario
- Carrier icon consistent with UI
- Location "ship" icon toggles between ships and airports.
2020-04-03 21:43:19 +01:00
Stuart Buchanan
6b17604ba8 Carrier launcher: Allow setting altitude 2020-04-03 20:37:37 +01:00
Stuart Buchanan
8a782ea386 Updated Aircraft Carrier iconography for Launcher 2020-04-03 16:16:11 +01:00
Stuart Buchanan
e1f9f6707c Add carrier-take-off and carrier-approach overlays
Adds support for carrier variants of the take-off
and approach overlays, with Automatic selection if
requested.
2020-04-03 16:06:55 +01:00
James Turner
968fbd82e0 Fix typo breaking mag-compass and others 2020-04-03 09:57:13 +01:00
James Turner
f24b886ce4 Launcher: fix favourites loading
Also fix some warnings, closer to no output from the launcher.
2020-04-02 16:13:12 +01:00
gallaert
1ce36af298 - When HLA is enabled in Simgear, HLA is also enabled in Flightgear
making the build between Simgear and Flightgear consistent.
- Fix an issue with lib/lib64 path between CentOS/RedHat distributions
  and Debian derived distributions.
- Fix a compilation issue with HLA in the Flightgear code.
2020-04-01 21:02:24 +01:00
James Turner
5b14d6e495 HID : split out raw logging from event logging.
This makes developing XML config files much easier
2020-04-01 20:43:50 +01:00
James Turner
8bedd52e2b HID: allow raw-descriptor parsing in the XML
Also fix deadband computation (do it after min-max ranging)
2020-04-01 16:32:21 +01:00
James Turner
005ddf7c98 Optimisation: avoid property name lookups 2020-04-01 16:20:29 +01:00
James Turner
4addaa9b00 Fix a warning 2020-04-01 15:30:15 +01:00
James Turner
ca97866dd3 Fix a warning 2020-04-01 15:30:06 +01:00
James Turner
96be636240 Fixing up HID event input on Mac/Windows
Removing old macOS separate input - the HID version is better in
every way.
2020-04-01 15:29:58 +01:00
Jakub Kákona
b4746123bd Merge remote-tracking branch 'upstream/next' into next 2020-04-01 15:51:23 +02:00
James Turner
2904321959 Launcher: favourite aircraft support 2020-04-01 10:47:29 +01:00
James Turner
3060cf10c6 Remove a logging call. 2020-03-31 13:56:01 +01:00
James Turner
8ddf4d6699 Fix reset-data-path dialog logic
Use correct root path key in QSettings, everywhere
Use the direct Win32 API until Qt wrapper is fixed.
2020-03-26 17:35:01 +00:00
James Turner
0483f2996a Simplify Launcher thumbnail display code
Remove old code paths in the AircraftModel/LocalCache, especially
2020-03-26 17:35:01 +00:00
Erik Hofman
a27dfe1feb Move more modern C++ idioms and use std::unique_ptr for moving data ownership around 2020-03-26 09:55:11 +01:00
Lars Toenning
d4b1e42b83
Fix playback duration during replay
Fixes #1856
Playback starts at endTime - duration if checkbox is set to active. Duration and checkbox status will be saved for umcoming sessions.
2020-03-25 17:21:14 +01:00
James Turner
7811b11565 Fix Yasim ground interface recursion bug
The base (non-FlightGear) implementation of YASim ground getBody 
would always call itself. Fortunately we always replace it with the
FG-specific subclass (FGGround).
2020-03-24 22:37:23 +00:00
James Turner
7fe641f3b3 Clang: fix some warnings 2020-03-24 22:37:23 +00:00
James Turner
2c056507ce Launcher: reduce timeout for HTTP updates
This helps download performance from inside the launcher
2020-03-24 22:37:23 +00:00
James Turner
e6e9a091e1 Merge /u/fgarlin/flightgear-src/ branch next into next
https://sourceforge.net/p/flightgear/flightgear/merge-requests/192/
2020-03-24 20:42:16 +00:00
Fernando García Liñán
6f676ee85b Compositor: Added $FG_ROOT/Compositor/Effects as a resource provider. 2020-03-24 19:44:05 +01:00
Richard Harrison
9034ed5d46 Splash Screen fixes:
Specify type for options that are passed into the readRefImageFile (ref: devlist Andreas Mueller 14/03)
2020-03-23 18:10:57 +01:00
James Turner
5dc2f20848 Launcher: fix scanning of aircraft dirs on startup
https://sourceforge.net/p/flightgear/codetickets/2195/
2020-03-23 16:33:39 +00:00
James Turner
86e81735c5 Launcher: fix a typo 2020-03-23 10:06:31 +00:00
James Turner
cb830b70ff Launcher: add setting for texture-cache 2020-03-23 10:06:31 +00:00
Julian Smith
1e330f9445 src/Viewer/ViewPropertyEvaluator.cxx: cope with root node being bool.
Aircraft rah-66 has a bug where it sets root node to type BOOL, which breaks
ViewPropertyEvaluator::getDoubleValue's handling of default values - the string
value of the node is no longer an empty string so we ended up returning 0.0 or
1.0 instead of default_.

The fix is to special-case BOOL. Have also special-cased handling of the root
node, as this is a fairly important part of how ViewPropertyEvaluator works.
2020-03-22 19:26:28 +00:00
James Turner
5f0c10d94d Fix incorrect write() return code handling 2020-03-20 22:24:44 +00:00
James Turner
6849311d49 Own the SGReaderWriterOptions object
Prevents it being unintentionally freed during the read call, causing
a crash depending on the OSG version (some versions take a kung-fu
death grip)
2020-03-20 18:43:21 +00:00
James Turner
162ba266d0 Fix a warning 2020-03-20 11:40:47 -07:00
James Turner
26b527f151 Fix Linux compilation 2020-03-20 11:40:32 -07:00
James Turner
177fc565da Launcher: initial carrier support
Allow selecting carriers from scenarios, and starting at either a
parking position, or a distance offset from the FLOLS (effectively
a crude ‘on-final’)

Extend the —carrier startup option to accept a runway ident of FLOLS,
in conjunction with the existing —offset-distance argument.
2020-03-20 15:51:47 +00:00
James Turner
f903cdfa50 Linux/macOS: use flock() to implement exclusive launch.
Previous implementation wasn’t correct, use a better one now. In the
case of a non-clean exit we will leave a stale .pid file in FG_HOME,
but we clear stale files on the next launch.
2020-03-20 12:08:35 +00:00
James Turner
a22d7943a4 Launcher: set package locale based on user language
This should in theory enable localised strings in catalogs, but need
to validate the full workflow here.
2020-03-17 11:46:26 +00:00
James Turner
ffbbe54cbc Launcher: create popup windows on demand
This avoids some flickering issues on macOS, and reduces resource use 
generally.
2020-03-17 11:14:11 +00:00
James Turner
cf8ec5998e Launcher: disable grid mode for update tab
Since the UI doesn’t work well in grid mode, and the list of updates
is limited, force list mode for the updates tab.

https://sourceforge.net/p/flightgear/codetickets/2172/
2020-03-17 10:00:17 +00:00
James Turner
d52f1b5d47 Improve in-sim launcher behaviour
Restrict the UI to the pieces which make sense.
2020-03-17 10:00:17 +00:00
James Turner
7688007c68 Guard against potential cause of crash:
https://sourceforge.net/p/flightgear/codetickets/2138/
2020-03-17 10:00:12 +00:00
Julian Smith
25a64b2cba src/Viewer/view.cxx: View::recalcLookAt(): Use new view[]/config/eye-fixed tag.
We only look at config/eye-lon-deg-path etc if eye-fixed is true. This tag
should be set to true for all views where the eye position is fixed - e.g. all
Tower views plus Fly-By view in fgdata:defaults.xml.

This allows b26 turret views to work without requiring modifications to the
aircraft (which would break usage with older releases of fgfs).
2020-03-16 21:08:48 +00:00
Julian Smith
368443a4b3 src/Viewer/view.cxx: Fixed Walker Orbit view.
The fix is to add handling of target-lon-deg-path etc in View::recalcLookAt.
2020-03-16 21:08:48 +00:00
Julian Smith
db255233f7 src/Viewer/ViewPropertyEvaluator.*: added getBoolValue(). 2020-03-16 21:08:48 +00:00
Julian Smith
1e07dab5c5 src/Viewer/ViewPropertyEvaluator.cxx: fix getSequenceDoubleValue()'s handling of default value.
If node's string value is '' then return <default_> - used to return 0.0 which
is incorrect.
2020-03-16 21:08:48 +00:00
James Turner
a3d75e8573 Voice synth: reduce some log output levels 2020-03-16 11:07:35 +00:00
Julian Smith
904e55d657 src/MultiPlayer/multiplaymgr.cxx: use SGPropertyNode_ptr to avoid explicit delete.
As suggested by James Turner
2020-03-15 15:30:05 +00:00
James Turner
2dcf9c30bb Further path -> UTF8 fixes for Windows
Requires corresponding SimGear change. With this last round, we work
with FGData on non-Latin1 path on Windows. (Final fixes are for
Nasal io.readfile, which needed io.stat to work, and SGSky allowing
correct SGPath use)
2020-03-15 15:00:55 +00:00
James Turner
36ba1e3dce UTF-8 support: replace Nasal io.stat with our own.
Replace the default io.stat with one which uses our validator, and
uses SGPath to call _wstat on Windows. This does mean we return less
information in the stat() result, but it seems nothing actually uses
the result apart from checking if the file exists.
2020-03-14 21:01:45 +00:00
Erik Hofman
fb348d1a8a Fix a false compiler warnig about brackets not protecting the next if statement 2020-03-14 14:04:22 +01:00
Richard Harrison
b049865cb2 fixes #2123 Relocation splash distorted.
Mark images loaded from splash with origin of splash to prevent use of DDS texture cache and therefore fix distortion by preventing rescale to power of two
2020-03-13 18:30:56 +01:00
James Turner
9389c6564f Nasal geodinfo: warn when scenery is not loaded 2020-03-13 16:46:54 +00:00
James Turner
8edcaa4853 Merge /u/ltoenning/flightgear_sim/ branch fix/2146 into next
https://sourceforge.net/p/flightgear/flightgear/merge-requests/190/
2020-03-13 13:53:30 +00:00
James Turner
7e9930e871 Move fnt code from PLIB into 3rdparty
This enables us to fix TXF loading to use UTF8 paths, required for
handling non-ASCII paths on Windows.
2020-03-13 12:21:56 +00:00
Lars Toenning
2c9d64dcc6
Fix broken sound mute function
Fixes #2146
2020-03-13 11:13:30 +01:00
James Turner
e492ddd5a0 Event more local8Bit -> UTF8 fixes 2020-03-13 09:53:49 +00:00
James Turner
27410761f3 Lots of UTF8 path correctness fixes 2020-03-12 14:23:44 +00:00
James Turner
5b41f374c6 L10N fixes: handle UTF8 paths in more places.
Still not complete, but now we set the command line args to be UTF-8 on
Windows, we can strip out more of the ‘local 8-bit’ places (which
screw up, generally).
2020-03-12 10:51:49 +00:00
Erik Hofman
3cb05a9207 Do not try to initialize all 16 joysticks every frame if they where not found previously. Try it once every second instead. 2020-03-12 10:31:38 +01:00
Julian Smith
ab7e7ec7b4 src/Main/globals.cxx: don't load /ai/models/ from autosave.xml file.
This cleans things up if earlier 'next' build as added spurious property items
to autosave.
2020-03-11 21:49:15 +00:00
Julian Smith
20a9953130 src/MultiPlayer/multiplaymgr.cxx: Don't load complete -set.xml of multiplayer aircraft.
When loading -set.xml, we load into temporary 'set' node,
then copy across only set/sim/view[]/config/* values into
/ai/models/multiplayer[]/set/sim/view[]/config/.

This ensures that we have just the information required for multiplayer views,
and avoids problems where some properties in /ai/models/multiplayer[]/ were
being archived to autosave_*.xml and loaded in later flightgear sessions.
2020-03-11 21:49:15 +00:00
James Turner
c12824bc94 Basic Canvas tests, including image pixel ops 2020-03-11 17:14:38 +00:00
James Turner
e509711075 Fix some warnings from current Apple clang
- remove some unused vars
- remove use of std::mem_fn / std::bind2nd
2020-03-10 17:02:08 +00:00
James Turner
40a85cae28 Launcher: fix some warnings, maybe a crash
Avoid binding loop warning, and change logic around re-starting the
aircraft dirs scan, to hopefully clarify the crash Brendan and others
are seeing.
2020-03-10 16:10:55 +00:00
Lars Toenning
e2135369ce Minor code fixes 2020-03-10 14:08:29 +00:00
Lars Toenning
aca625eda2 [swift] Fetching ground elevation for interpolation 2020-03-10 14:08:29 +00:00
Lars Toenning
34915125a1 [swift] Fix frequency casting regression 2020-03-10 14:08:29 +00:00
Lars Toenning
f4b60ccd90 [swift] Code cleanup 2020-03-10 14:08:29 +00:00
Lars Toenning
182df4e6ae [swift] Fix segfault on stopping server 2020-03-10 14:08:29 +00:00
Lars Toenning
ee0d03b4d0 [swift] Fix memory leak in traffic-service 2020-03-10 14:08:28 +00:00
Lars Toenning
eb3fba1871 [swift] Adding swift aircrafts to TCAS 2020-03-10 14:08:28 +00:00
Lars Toenning
d14073cd24 [swift] Adding aircraft to property tree and map 2020-03-10 14:08:28 +00:00
Lars Toenning
e6a9515b59 [swift] Enhancing version compatibility check 2020-03-10 14:08:28 +00:00
Lars Toenning
fc0a8b1c60 [swift] Fix message node 2020-03-10 14:08:28 +00:00
Lars Toenning
0423472f74 [swift] Sending ground elevation 2020-03-10 14:08:28 +00:00
Lars Toenning
cab6581d3d [swift] Pointers to nodes for get/set data
Calling fgSetXY/fgGetXY takes to long (especially when calling the often needed properties a few times per second in main loop).
Switching to pointers for these nodes, initialized within service-class constructor.
2020-03-10 14:08:28 +00:00
James Turner
3f14d53286 FlightPlans: fix save/load of restrictions, deleting legs from Nasal
- Fix Leg ownership to avoid segfaults when deleting them via Nasal
- Modify FP save/load code so restrictions and holds are correctly
  saved and restored

Extend the tests to cover these cases.
2020-03-10 14:00:40 +00:00
James Turner
de172de5b3 Launcher: Fix a typo breaking path re-ordering 2020-03-10 10:28:56 +00:00
James Turner
a405d0508b Fix a dumb allocation bug on Windows 2020-03-09 16:28:22 +00:00
James Turner
410c249ba8 Launcher: enable/disable all add-on types
Allow enable/disable in the UI of everything in the ‘add-ons’ page of
the launcher.
2020-03-09 16:16:50 +00:00
Erik Hofman
32d6f75305 Process the buttons even if the axes are not declared initialized 2020-03-07 09:22:22 +01:00
Slawek Mikula
517cf19ec6 - ATC radio list - adding selectors to radio R1/R2 for corresponding frequencies 2020-02-25 13:08:06 +00:00
James Turner
8126db050a Merge /u/geoffmc/flightgear/ branch msvc-build3 into next
https://sourceforge.net/p/flightgear/flightgear/merge-requests/182/
2020-02-24 13:12:15 +00:00
James Turner
219ceacc7a macOS Catalina device filtering 2020-02-24 13:09:36 +00:00
James Turner
ff70578d57 Launcher: Fix a QML warning on startup 2020-02-24 11:33:05 +00:00
James Turner
f14b8ba6d4 Validate Nasal makeTimer arguments
When the callback arguments can’t be validated,
catch is and actually report a failure, instead of creating a
non-functional timer object
2020-02-24 11:33:05 +00:00
James Turner
a3731875a1 Make Launcher ratings settings persistent 2020-02-24 11:33:05 +00:00
Stuart Buchanan
1f0c21a371 Warn when Nasal module not set in defaults.xml 2020-02-19 20:32:22 +00:00
Erik Hofman
e4c393ba9c Revert delayed running of fdmex for in-air starts since it does more damage than good. 2020-01-31 10:03:31 +01:00
James Turner
12cd2d8e9b Merge /u/legoboyvdlp/flightgear-src/ branch fix-segfault into next
https://sourceforge.net/p/flightgear/flightgear/merge-requests/188/
2020-01-30 10:42:18 +00:00
jano
395a654692 make the aiship speed respect strictly the target speed when close enough, should improve drifting carrier on mp 2020-01-28 11:03:20 +01:00
jano
c770358f13 added the velocity for the ufo, used in lag compensation 2020-01-28 11:03:20 +01:00
Erik Hofman
6df768fa5f Store the initial axis values and if just one of them changes declare the joystick initialized 2020-01-27 18:12:09 +01:00
legoboyvdlp R
b920a09fcf Correct whitespace in NasalPositioned.cxx; fix segfault in NasalPositioned by adding null check in the legGhostGetMember method; add test case for segfault 2020-01-27 16:27:46 +00:00
Stuart Buchanan
f6285bc528 Fix directional lights for AMD
Some AMD drivers do not like triangles for point sprites, which
breaks directional lights.  This works around this by allowing
users to set /rendering/triangle-directional-lights=false which
falls back to the non-directional implementation of a point.
2020-01-27 09:30:09 +00:00
Erik Hofman
65a20b5829 Read the raw values and check them against the saturation value, if one of them is larger then initialization of the joystick is still in progress. 2020-01-27 09:15:53 +01:00
Erik Hofman
2d0b44ee63 If js is valid (again), create a new instance of jsJoystick so removing an joystick from and USB port and attaching it again get the joystick in a working order. 2020-01-26 17:44:19 +01:00
Erik Hofman
d4459c8205 Fix a typo 2020-01-26 14:30:24 +01:00
Erik Hofman
3405ea2aaa Joystick axes can get initialized to extreme values, at least on Linux. Hold of working with the axis values until all values have become sane at least once 2020-01-26 14:10:07 +01:00
Bertrand Coconnier
973bf32074 [JSBSim] Added the ability to log properties in a CSV file. 2020-01-25 16:05:30 +01:00
Erik Hofman
cf5bfc5dd9 On-ground trimming needs fdmex active while in-air trimming does not for reliable operation. This might be a problem within the trimming routines but for now this works. 2020-01-23 11:54:33 +01:00
Erik Hofman
1cc0d9e97f Fold of running JSBSim until after the trimming routine. 2020-01-22 14:54:11 +01:00
Erik Hofman
123eb41819 Copy the initial properties a second time after initilization. 2020-01-22 14:53:27 +01:00
Erik Hofman
2d2d5dbb76 Switch to C++11 threads, mutexes and lock_guards. Switching to C++11 condition_variables requires some more thought. 2020-01-22 13:45:28 +01:00
Erik Hofman
94b12aa992 Postpone running the simulation until after initialization and do an extra trim right after creation to properly initialize the output parameters. 2020-01-18 14:29:17 +01:00
jano
db295a9afc introduction of a zero lag mode when pilots are synched in time, eg using ntp. 2020-01-14 11:10:28 +01:00
Jakub Kákona
1822d003db Add electric engine support to YASim. 2020-01-11 23:02:33 +01:00