1
0
Fork 0
Commit graph

10360 commits

Author SHA1 Message Date
Richard Harrison
5fe24f741c Multiplayer: fix bool transmission when all 0
If all bools in a block are 0 the block would never be transmitted, i.e. fix a bug whereby each block of 0..30 used to need at least one true value to transmit the block.
2018-05-13 06:45:44 +02:00
Richard Harrison
d6556f5c94 Multiplayer: consistent callsign in properties.
To ensure consistent properties also tie the callsign to where it would be in a local model.
2018-05-13 06:45:44 +02:00
James Turner
1555e1d6cb Launcher: fixes for lingering previews
Also better fix for some ‘assign Qurl from undefined’ warnings
2018-05-09 20:11:58 +01:00
James Turner
8738e18921 Launcher: spinner when adding a catalog 2018-05-09 19:43:44 +01:00
James Turner
57a866fc60 Scrollbar for launcher settings 2018-05-09 19:35:24 +01:00
James Turner
b6f7f17c5c Launcher: fix warning about Qurl / undefined 2018-05-09 19:35:12 +01:00
James Turner
607cef530a Add the default tutorial airport to the launcher 2018-05-08 23:18:19 +01:00
James Turner
d4cd82b521 Fixes for Qt 5.4 compat 2018-05-08 22:17:07 +01:00
James Turner
ee48fddd5e Compute scrollbar extent using alternate props
This computation is close enough, and removes the need for private
headers.
2018-05-08 22:16:53 +01:00
James Turner
0da17d895c Fix ‘add-default-catalog’ flow from aircraft list 2018-05-08 06:52:07 +01:00
James Turner
42936f4f22 Launcher: fix date-time picker 2018-05-07 22:19:34 +01:00
James Turner
552df27341 NavData API additions 2018-05-07 16:53:43 +01:00
James Turner
71a1348037 UI tweaks for the launcher 2018-05-07 16:53:25 +01:00
ThomasS
2cbd660dc9 Feature for requesting canvas images per HTTP as described in http://wiki.flightgear.org/Read_canvas_image_by_HTTP 2018-05-03 10:25:34 +02:00
James Turner
102fe04e91 Import PLIB JS code into FlightGear
- will permit bug-fixing which cannot occur for
  official PLIB.
2018-05-03 00:02:09 +01:00
James Turner
0762af76c2 Indexed-device config files for event-input layer
This allows multiple identical devices with event-input, using the
same syntax as for PLIB JS
2018-04-29 21:52:56 +01:00
James Turner
2ce4bcb666 Allow distinguishing PLIB joysticks by index (count)
This gives a simple way to have different config files for multiple
identical devices, such as the Saitek/Logitech throttle-quadrant
2018-04-29 19:56:01 +01:00
James Turner
0cdd6c4e70 Re-init support on HID-event-input
To ensure the device-configuration-map is re-read, added a default
ctor and moved the config-map creation to init()
2018-04-29 11:25:51 +01:00
James Turner
13857e001e Add override decls in AIManager
(Done while tracing another crash, but committing separately)
2018-04-29 10:12:40 +01:00
James Turner
2a31893862 Fix a crash when updating the user aircraft 2018-04-27 23:32:28 +01:00
James Turner
aed59ea4bf Fix an assert with autopilot groups
(Missing call to the base class in bind())
2018-04-27 13:57:32 +01:00
James Turner
e45c93dbc7 launcher: explicitly request desktop OpenGL
This should help with a white-screen in the launcher Gijs reported,
due to our Optimus selection symbol interacting weirdly with the
dynamic OpenGL detection in Qt
2018-04-27 09:53:49 +01:00
James Turner
6a6c9bcda2 Merge /u/thomass-22/flightgear-fork/ branch additionalAiInfo into next
https://sourceforge.net/p/flightgear/flightgear/merge-requests/129/
2018-04-25 16:26:54 +00:00
James Turner
1fcd86a8a9 Launcher: fix missing import for Style 2018-04-25 16:24:14 +01:00
James Turner
fe779fc579 YASim: Make some name-spacing explicit
Needed for upcoming subsystems change
2018-04-25 08:49:17 +01:00
ThomasS
3dcac53952 camelCase identifier in code and hyphenated property names. Suffix "-sec" is used because it complies to other timestamp properties in the property tree. Suffix "utc" is not used because the property just reflects an internal value used by the AI system. Whether it is UTC (currently it is) is up to the AI system and cannot be defined by the property name. 2018-04-24 09:54:35 +02:00
ThomasS
94f82c47ef Additional departure airport/time and arrival airport/time information in the property tree for AI aircraft. 2018-04-24 06:20:28 +02:00
James Turner
7ae8137b77 Launcher: nicer looking summary transparency 2018-04-16 15:41:48 +01:00
James Turner
7431fb12b3 Launcher UI feedback: mark history buttons as disabled 2018-04-16 15:13:06 +01:00
James Turner
8a390dab2a Add-ons page UI improvements based on feedback 2018-04-16 15:04:21 +01:00
Stuart Buchanan
510f2de84d Expose additional Navaid fields for use by Nasal 2018-04-16 13:37:17 +01:00
Edward d'Auvergne
667cd86656 fgValidatePath: Typo fix allowing the animated jetways to save files again.
The typo was introduced in 7e607b8403 from July
2016.  The result was a series of alert messages such as:

savexml: writing to 'Path "/flightgear/home/.fgfs/runtime-jetways/0.xml"' denied
(unauthorized directory - authorization no longer follows symlinks)
2018-04-13 09:08:07 +02:00
James Turner
22cf6bd5e4 Fix a crash found by a space cowboy :)
Thanks to Tobias Dammers
2018-04-12 17:38:12 +02:00
James Turner
921f29fbfe HID-Input disambiguation tweaks 2018-04-09 22:03:49 +01:00
James Turner
361225f919 Launcher: fix the descriptionForState/null warning 2018-04-09 17:13:15 +01:00
James Turner
9fbd879c9f Remove a stray log message 2018-04-09 15:52:14 +01:00
James Turner
72f9ff3735 Remove obsolete Launcher files 2018-04-09 15:48:43 +01:00
James Turner
a94d893124 Styling tweak for launcher hangars list 2018-04-09 11:17:15 +01:00
James Turner
2c48914630 One more ATC text formatting fix
As requested by Wkitty on the mailing list.
2018-04-09 09:33:28 +01:00
James Turner
4878b28a22 Fix MSVC build 2018-04-09 01:29:01 +01:00
James Turner
205fadbff3 Stubbing out Add-ons controller
Also CatalogListModel stubs
2018-04-08 23:52:27 +01:00
Edward d'Auvergne
3b79530b06 CMake: Split the target links and includes into separate CMake modules. 2018-04-05 21:06:02 +02:00
Edward d'Auvergne
6a730b5820 CMake: The main sources/headers have been shifted into FG_{SOURCES,HEADERS}.
This allows the sources and headers in src/Main/ to be used by other targets.
They are grouped into the new "Main" flightgear component via the macro in the
FlightGearComponent CMake module.  The bootstrap.cxx file with its main function
has been separated out into a separate variable MAIN_SOURCE for use by the fgfs
binary.

All these files have therefore been removed from the test_suite CMakeLists.txt
file, as they are added via FG_SOURCES and FG_HEADERS.  The MSVC grouping code
also does not need to deal with the now deleted separate SOURCE and HEADER
variables for these files.
2018-04-05 21:06:02 +02:00
Edward d'Auvergne
e88017eba3 CMake: Shifted the Mac bundle commands into its own CMake module. 2018-04-05 21:06:02 +02:00
Edward d'Auvergne
93c4aab885 CMake: Shifted the MSVC grouping code into its own CMake module.
This is for simplifying the main src/Main/CMakeLists.txt file and allowing the
code to be shared with the test suite.
2018-04-05 21:05:54 +02:00
Edward d'Auvergne
f8e57f921d CMake: Shifted the FlightGear embedded resources code into its own CMake module.
This is for simplifying the main src/Main/CMakeLists.txt file and allowing the
code to be shared with the test suite.

The generated source and header files have also been removed from the main
source list and placed in the CMake module as the global variables
EMBEDDED_RESOURCE_SOURCES and EMBEDDED_RESOURCE_HEADERS.
2018-04-05 21:05:30 +02:00
Edward d'Auvergne
bd3a3db50b CMake: Shifted the target setup code into its own CMake module.
This is for simplifying the main src/Main/CMakeLists.txt file and allowing the
code to be shared with the test suite.
2018-04-05 21:05:16 +02:00
James Turner
227dda4df5 ATC spacing improvements by WKitty 2018-04-05 13:07:44 +01:00
James Turner
9000185b92 Improve AI parking-pushback warning message
Specify the airport when a parking has no associated pushback route.
Improvement from WKitty42
2018-04-05 12:58:58 +01:00
Edward d'Auvergne
11f591261e FGNasalSys::setTimer: Timer names now identify the file and line number.
This identifies the function for the callback and allows for better debugging of
the sim and real time SGTimerQueues in the event manager.
2018-03-23 20:07:49 +01:00
Edward d'Auvergne
0f96032487 TestSuite: Shift of the globals unit test helper functions into the test suite.
The setting of the SG log levels and developer mode has been removed as this
clashes with the output control set by the test suite main() function.
2018-03-23 17:26:05 +01:00
Edward d'Auvergne
7616f1ec3e TestSuite: Migration of the posinit unit tests. 2018-03-23 17:26:05 +01:00
Edward d'Auvergne
85ad420be1 TestSuite: Migration of the Add-ons management unit tests. 2018-03-23 17:26:05 +01:00
Edward d'Auvergne
c9122ff84b TestSuite: Converted the old tests/test-mktime.cxx program into a unit test.
This required many time related include files, functions, and variables to be
tested for via CMake, and converted to macros via #cmakedefine, so that they
would be automatically set for the test-mktime.cxx file.
2018-03-23 17:26:04 +01:00
Edward d'Auvergne
941c5dc8f2 Main: Formatting standardization for the src/Main/CMakeLists.txt file.
This includes spacing, tab to space replacements, and alphabetical ordering.
2018-03-23 17:26:04 +01:00
James Turner
01f840487d Split launcher code to fix ownership issues
This avoids passing a QmainWindow into the QML engines, which don’t
seem to handle that very well.
2018-03-22 13:52:03 +00:00
James Turner
f75f413970 Ensure launcher AW toggle overrides the sim setting
Set the property value to false explicitly when BW is requested in
the launcher, otherwise the auto-saved value takes over.
2018-03-22 11:59:15 +00:00
James Turner
28d8317242 Work-arounds for launcher crashes on ‘fly’
Two are enabled, one is disabled for people to test.
2018-03-22 09:32:30 +00:00
James Turner
1c78c65b19 Popup an error box when QtQuick errors occur. 2018-03-20 16:32:31 +00:00
James Turner
010bfc8378 Fix a compile error reported by Edward 2018-03-19 22:33:17 +00:00
James Turner
cb4a823836 Missed some files fixing QQ2 version import 2018-03-19 22:32:23 +00:00
James Turner
4c2e52c2dc Standardise QtQuick version to 2.4
Will fix an issue reported on the forum where a 2.7 dep crept it.
2018-03-19 08:22:11 +00:00
James Turner
e894cb5188 Fix case-sensitivity 2018-03-19 00:36:49 +00:00
James Turner
d3299a1f71 Remove references to deleted files 2018-03-18 22:09:01 +00:00
James Turner
024ffa5e9d Remove obsolete launcher files
Clean-up now widget-based settings are gone
2018-03-18 17:00:54 +00:00
James Turner
19ae26164a Summary page converted to QtQuick 2018-03-18 16:39:17 +00:00
James Turner
eaf89ab23b Avoid use of Connections.enabled for Qt < 5.7 compat 2018-03-18 16:25:48 +00:00
James Turner
7339e261e9 Direct file dialog (no need for QtQuick Controls)
This should simplify the needed packages on Debian, Ubuntu, etc
2018-03-18 16:18:17 +00:00
James Turner
d92647b364 Fix duplicate entries in threaded location search 2018-03-16 10:02:20 +00:00
Florent Rougon
109a59b393 Add-ons: const id; adjust the Addon constructors, remove Addon::setId()
Since the new _storagePath data member internally contains the add-on
id, changing _id after _storagePath has been initialized would make both
data members inconsistent. As changing the add-on id is probably not a
very useful operation, the simplest way to prevent such an inconsistency
from happening is to make Addon's _id data member const (as is already
the case for _storagePath), and thus remove Addon::setId().
Consequently, remove the Addon default constructor too, since add-ons
with an empty id would be ill-formed and couldn't be changed (_id being
const now). This leaves us with one Addon constructor:

Addon(std::string id, AddonVersion version = AddonVersion(),
      SGPath basePath = SGPath(), std::string minFGVersionRequired = "",
      std::string maxFGVersionRequired = "",
      SGPropertyNode* addonNode = nullptr);
2018-03-11 23:17:23 +01:00
James Turner
fa72d8dd06 Popup window tracking helper hooked up 2018-03-11 11:10:02 +00:00
James Turner
37dc418ce1 QtQuick launcher settings implementation
Moves the settings and environment pages of the launcher into QQ2,
and provides more QtQuick items to use.
2018-03-11 11:10:02 +00:00
Florent Rougon
9a044a474b Add-ons: new Addon methods to access the storage area beneath $FG_HOME/Export
New methods Addon::createStorageDir() and Addon::getStoragePath() with
corresponding Nasal bindings in the addons.Addon ghost:

  createStorageDir() method (returns the dir, doesn't fail if it already
                     exists)
  storagePath        read-only attribute to get the dir

The directory reserved for each add-on is
$FG_HOME/Export/Addons/ADDON_ID, but please use the above methods (or
the corresponding C++ ones) to avoid hardcoding such paths in your code.

Also create directory $FG_HOME/Export/Addons in fgInitConfig() as a way
of reserving the namespace, in order to prevent future failures in case
someone would have the strange idea to create it as a file...
2018-03-11 11:30:05 +01:00
Richard Harrison
10caef48b1 Change YASim solution failure message to display as an alert; but not to call exit().
It is the call to exit that causes FG to lock up and become a zombie.

Alternative is to throw an exception, i.e.:
       throw sg_error(std::string("YASim SOLUTION FAILURE:") + a->getFailureMsg(););
2018-03-07 03:09:45 +01:00
James Turner
7b7e50741f Launcher: fix preview image aspect ratio
Accidentally left in a hard-coded 16:9 ratio, no wonder some images got
squished. Shuttle is now re-elongated verticallitaly :)
2018-03-06 18:34:54 +00:00
Richard Harrison
ab8ca2d832 Merge remote-tracking branch 'main-source/next' into next 2018-03-05 23:34:28 +01:00
Richard Harrison
e953951820 Merge remote-tracking branch 'jsb/yasim' into next
This adds the fix for non converging aircraft. Henning has performed a thorough analysis of all of FGAddon and other repositories and there are a few models that fail, however there have always been a few that fail - but with this patch this situation is improving.
2018-03-05 23:32:06 +01:00
James Turner
5020e4655e Launcher: explicit sizes in aircraft list
Fix some scaling issues when mixing pixel- and point- sized fonts,
especially on Windows
2018-03-05 10:49:30 +00:00
Henning Stahlke
12b2022503 YASim add error message, solver shall not quit silently. 2018-03-04 22:18:45 +01:00
James Turner
7f815c4c51 Remove non-functional transparency from PUI map
This alpha blending never worked, and now it really doesn’t work, so
remove it (PUI map is not long for this world, anyway)
2018-03-01 15:55:41 +00:00
James Turner
6e6fafd5b4 Launcher: fix on-disk aircraft variant previews
This fixes e.g the issue with the Shuttle reported by Thorsten, variant
previews are now shown correctly.
2018-03-01 15:39:46 +00:00
James Turner
e571564c59 Launcher: tweak to be compatible with older Qt 2018-03-01 11:34:53 +00:00
James Turner
f760b8cd8f Launcher: fixes for invalid catalog handling 2018-02-28 17:56:40 +00:00
Florent Rougon
f2c050d476 Add-ons: re-add implementation of Addon::getUrls()
The implementation of Addon::getUrls() was mistakenly removed in commit
a137aed541, re-add it.
2018-02-27 13:17:42 +01:00
Florent Rougon
a9084ac561 Add-ons: make NewGUI read dialogs from $addon_dir/gui/dialogs
As for aircraft, an add-on can now add its custom dialogs in
$addon_dir/gui/dialogs. This commit makes NewGUI consider this directory
as a dialog-providing one for each registered add-on.
2018-02-27 13:17:42 +01:00
Florent Rougon
30cfbd1f91 Add-ons: load add-on-specific menu bar items from addon-menubar-items.xml
If an add-on has a file named addon-menubar-items.xml in its base
directory, load it and add its items to the FG menubar.

Logically, fgStartNewReset() should call
flightgear::addons::AddonManager::instance()->addAddonMenusToFGMenubar()
in order to re-add the items, however doing so would cause the
add-on-specific menus to be added one more time on every reset, because
for some reason, commit 45ea8b5daa added
the PRESERVE attribute to /sim/menubar (apparently to preserve the state
of menu entries upon reset?).

Note: the addon-menubar-items.xml files are reloaded during reset,
      however the menu bar doesn't reflect this, since adding the
      reloaded items to the menu bar in fgStartNewReset() would cause
      the add-on-specific menus to appear several times in the menu bar,
      as explained above.
2018-02-27 13:17:42 +01:00
James Turner
4f96039e70 Fix a crash when package data is missing
This may explain some of the erratic startup crashes, due to the
master catalog being out of date for 2018.*
2018-02-27 11:33:40 +00:00
Richard Harrison
a6718cc73d 2018.1: fix default Airport.
As it says in the comments this really shouldn't be hardcoded...
2018-02-27 05:09:11 +01:00
Thomas Geymayer
82078b632b canvas GUI: Cleanup and trigger dragstart/end events 2018-02-25 14:59:56 +01:00
Henning Stahlke
25e34cc49c YASim solver convergence workaround 2018-02-21 07:47:04 +01:00
Thomas Geymayer
e295d991a6 Canvas/PUI: Fix interfering drag 2018-02-21 07:31:47 +01:00
Henning Stahlke
c2e7842110 YASim: attempt to fix MAC calculation for multiple wing sections. 2018-02-20 11:03:40 +01:00
Richard Harrison
48563acdd2 Multiplayer: lag adjustment clock mode initialization.
Ensure the property is initialized to zero during AI MP model binding.
2018-02-17 12:22:14 +01:00
Richard Harrison
40a602d732 Multiplayer: lag adjustment.
Preparation for work on the synchronisation and lag prediction filters that jano has underway - firstly by adding a property to indicate the mode of the clock being used. Pre 2018.1 will be mode 0.
2018-02-16 23:49:27 +01:00
James Turner
234320fe9d Launcher: basic aircraft state selection
Automatic selection in the launcher is disabled for now, since
it needs more testing before release, but the basic UI for selection
is straightforward enough to throw in.
2018-02-11 21:28:25 +00:00
James Turner
a05cdce793 Telent protocol Nasal command 2018-02-11 21:15:45 +00:00
James Turner
bd66bfb696 Fixes spotted by Florent 2018-02-11 21:08:02 +00:00
Henning Stahlke
3bac8b93f2 YASim: revert max solver iterations back to 10000 2018-02-11 16:38:19 +01:00
Henning Stahlke
59c059ddb6 YASim: export wing section MACs 2018-02-11 00:46:10 +01:00
Henning Stahlke
1b21f85c52 YASim CLI tool refactoring 2018-02-11 00:46:10 +01:00
Florent Rougon
da961b97f2 Add-ons: more specific file names for the interface between FG core and add-ons
The add-on framework now uses the following files in each add-on
directory:
  - addon-config.xml (previously: config.xml)
  - addon-main.nas   (previously: main.nas)

This is consistent with the addon-metadata.xml file that is already part
of the interface between FG core and add-ons. The goal is to make it
clearer, when browsing an add-on directory, which files belong to the
"FG core <-> add-on" interface and which files belong to the add-on
proper. This will be beneficial also when more files are added to the
"FG core <-> add-on" interface, such as possibly addon-events.xml in the
future.

This change is incompatible, thus it is the right time to do *before*
2018.2.1 is out, especially considering that this upcoming release
already has incompatible changes in the add-on API, namely the
requirement of the addon-metadata.xml file and the type of the argument
passed to each add-on's main() function. We'll try harder not to break
compatibility in the add-on API once 2018.2.1 is out. For now, it is
still a good time to try to get the API as clean as possible.
2018-02-10 19:49:02 +01:00
Henning Stahlke
365d68891f fix windows compile error 2018-02-04 19:16:09 +01:00
James Turner
a723111903 Prevent Nasal modifying certain properties
(Requires a corresponding SimGear change)
2018-02-04 17:25:32 +00:00
James Turner
b96d4bf315 Limit props/telnet subscription send rate
Prevent FDM-derived properties being sent at full speed (120Hz) which
overloads telnet connections. Instead track dirty properties and
send them at the protocol’s update rate (which is presumably what
the user expects)
2018-02-04 17:07:21 +00:00
Henning Stahlke
c985c19735 YASim: add variables for solver parameters 2018-02-03 21:27:26 +01:00
Henning Stahlke
12bf5cdfa6 YASim: refactor Version.cpp 2018-02-03 01:37:14 +01:00
ThorstenB
a9786c637c Silence some compiler warnings. 2018-02-01 23:15:23 +01:00
ThorstenB
beecf005ce Fix logic issue when clearing a GPWS fault. 2018-02-01 22:59:29 +01:00
ThorstenB
f37715f334 GPWS: clean up white-space (TAB vs space) and indentation mess 2018-02-01 22:58:11 +01:00
Henning Stahlke
4497df4ecd YASim: minor modification of CLI tool output to make copy&paste to XML easier 2018-01-31 07:49:30 +01:00
Henning Stahlke
a88a498d20 YASim: comment and variable rename 2018-01-31 07:49:30 +01:00
James Turner
e4343f4f46 Launcher: reduce warnings loading thumbnail data 2018-01-30 18:40:41 +00:00
James Turner
b6cd4c8726 Launcher: show aircraft URI and local path
Shift-clicking on the compact delegate will show the local path and
URI of the aircraft, to identify the source.
2018-01-30 18:40:21 +00:00
James Turner
db57b12723 Remove dead code 2018-01-30 17:25:08 +00:00
James Turner
f9e113d811 Fix jumping aircraft list when editing ratings 2018-01-30 17:24:41 +00:00
James Turner
9dc1c1bbcf Fix scrolling of aircraft details view 2018-01-30 17:24:07 +00:00
James Turner
865e72f204 Merge /u/jsb1685/flightgear/ branch yasim2 into next
https://sourceforge.net/p/flightgear/flightgear/merge-requests/118/
2018-01-30 11:31:49 +00:00
Henning Stahlke
2c671884f5 YASim: add support for variable tail incidence (hstab trim). 2018-01-29 14:10:40 +01:00
jean pellotier
b9b280abd1 a new clock following real time pace, for mp protocol
the current timestamp used in mp protocol and in AImultiplayer is not a good one:
it can pause, or even change speed if we change warp value.
we want it to be used for network protocol lag and jitter estimation, and
a time flowing linearly on both side is needed, here's a first introduction
of this timestamp relates to real elapsed time.
here it's initialised to the system clock, then follow the monotonic clock.
in future improvement, it will allow time synchronisation betwen mp players,
to have a very good close formation flight experience.
2018-01-29 12:51:43 +01:00
James Turner
4d28146796 Give TimeManager a subsystem-name
Also modernise the lookups now this is added.
2018-01-29 10:46:08 +00:00
Thomas Geymayer
193d7b1c6f canvas: Fix receiving keyboard events 2018-01-29 09:09:29 +01:00
Thomas Geymayer
39f7fbf9fc canvas: Refactor and protect against expired pointers 2018-01-28 19:25:03 +01:00
James Turner
c035b3e9e3 Better fix for Canvas-in-PUI compositing
This seems to work everywhere, let’s try it.
2018-01-28 16:10:18 +00:00
James Turner
f076fe1c1b Fix unwanted waypoint list transparency
Ticket: https://sourceforge.net/p/flightgear/codetickets/2009/
2018-01-28 15:59:51 +00:00
ThorstenB
087995448f GPWS: add optional support for Airbus-style callouts
The "Airbus" callouts ("2500", "hundred above", "retard") are not issued
by the original mk-viii unit, but adding support helps with better
simulation for Airbus a/c. The new callouts are disabled by default, and
are enabled by a specific setting of the GPWS "category-4" configuration
value (see Wiki).
2018-01-28 16:37:31 +01:00
ThorstenB
37085f29ac GPWS: minor clean-up and performance update 2018-01-28 16:37:24 +01:00
Richard Harrison
cfbae6efb4 Multiplayer: revised filtering and move emesary bridge properties to new index.
- /sim/multiplay/transmit-filter-property-base can now filter based on property index; or have the previous mode of transmitting only generics by setting to 1.
- Move emesary MP bridge property base index to 12000 - to allow filtering of all except these (to reduce packet size).
2018-01-28 15:50:43 +01:00
James Turner
c1947b6bc4 Fix PUICamera compilation
Some blending issues remain with Canvas-in-PUI, waiting to hear back
if Thomas has nay great ideas on those.
2018-01-28 14:23:22 +00:00
jean pellotier
2e919544b9 warning removal, forgot to remove ival when addressing bug 1885
it was the commit  2f84be16f9
2018-01-28 14:49:07 +01:00
James Turner
e186fc6e2a Launcher: avoid MP start with no server selected.
Default to first server in the list, if there is no valid previous
server to restore.
2018-01-28 12:35:12 +00:00
Florent Rougon
21b8c7719e FGMouseInput: fix two uses of std::ostringstream
Seeking to the beginning doesn't clear the contents. Note that we don't
use std::ostringstream::str() either, because apparently
std::ostringstream is too complex to be easily reset to a clean state,
so we just recreate an instance every time we need.

cf. https://stackoverflow.com/a/12112642/4756009 and
    https://stackoverflow.com/questions/624260/how-to-reuse-an-ostringstream/624291#comment437178_624276
2018-01-27 11:25:48 +01:00
Florent Rougon
99c809dda0 FGMouseInput: add shutdown() and reinit() overrides
- Modify global_mouseInput in init() and in shutdown(), because *these*
  are the places where FGMouseInput is enabled or disabled.

- reinit() does shutdown() followed by init().

Note: the commented-out block starting with "FIXME: memory leak" that is
      removed here was just an outdated comment, because SGBindingList
      is an std::vector<SGBinding_ptr>, where SGBinding_ptr is a smart
      pointer type (SGSharedPtr<SGBinding>). In other words, there was
      no leak in this place---at least, not recently.
2018-01-27 11:25:10 +01:00
Florent Rougon
2eb583e9e1 FGMouseInput: improve initialization sequence
Create the FGMouseInputPrivate instance in FGMouseInput::init() instead
of in FGMouseInput's constructor. This will allow straightforward
implementation of reinit() via shutdown() and init().

Also get rid of the 'initialized' bool, since bool(d) is now equivalent
(d being the std::unique_ptr<FGMouseInputPrivate> data member of
FGMouseInput).
2018-01-27 11:25:10 +01:00
Florent Rougon
e60e519f7e FGMouseInput: refactoring: use a smart pointer for mouse_mode::buttons 2018-01-27 11:25:10 +01:00
Florent Rougon
1832ade5f2 FGMouseInput: refactoring: use a smart pointer for mouse::modes
Using std::vector<mouse_mode> instead of std::unique_ptr<mouse_mode[]>
would have been possible of course, but a bit more awkward as
vector<>::size() returns an std::size_t but all the "adjacent" code is
based on the 'int' type.
2018-01-27 11:25:10 +01:00
Thomas Geymayer
40503f3410 Update for another nasal::Context change 2018-01-24 07:41:13 +01:00
Florent Rougon
9054a51dd3 fgrcc: use octal escape sequences instead of hexadecimal ones
Octal escape sequences can be as short as 2 bytes (\0, ..., \7),
therefore they allow one to generate shorter files than hex escapes, for
the same resource contents. The line lengths won't be as even, but this
is purely cosmetic, virtually no one will ever read the resource data
string literals, so this is quite a negligible drawback compared to the
advantage of using less space in the Git repository every time resource
files are committed.
2018-01-19 08:12:24 +01:00
Henning Stahlke
f1906f3b8a YASim: name clarifications, add 'const' to arguments, add initalizers in Airplane.hpp 2018-01-18 08:48:24 +01:00
Henning Stahlke
b59aefb73a YASim: add comments, add constants, export more props 2018-01-18 07:46:03 +01:00
Henning Stahlke
a2499b02a1 YASim: name clarifications in ControlMap 2018-01-18 07:46:03 +01:00
Henning Stahlke
2841599b12 add const to argument 2018-01-18 07:46:03 +01:00
Henning Stahlke
317ad86b80 remove useless comments 2018-01-18 07:46:03 +01:00
James Turner
821ae89f64 Fix aircraft-list selection bug after searching
Reported by Brendan Black, thanks!
2018-01-14 15:04:55 +00:00
Bertrand Coconnier
9508ada1f1 JSBSim sync (Fixed memory leaks) 2018-01-14 15:20:50 +01:00
James Turner
aa9ad6a780 Fix view right-drag interaction with PUI
When PUI doesn’t handle the right-mouse down, ensure it ignores the
mouse-up event.
2018-01-14 13:17:59 +00:00
Bertrand Coconnier
bb315488e1 JSBSim synchronization.
Added the ability to specify N1 & N2 spool up/down velocity via functions for turbines.
2018-01-13 19:48:35 +01:00
Bertrand Coconnier
c9e276e5dd Removed obsolete files from JSBSim.
These files were originally included for special trim routines. But these routines are no longer maintained in JSBSim and have already been partially removed from FlightGear.
2018-01-13 19:46:41 +01:00
James Turner
08a877cb8e Message box on start if FG-home is read-only
If running with the launcher, and FG-home is read-only, show a warning
to the user, since this is probably a surprise to them.

(In non-launcher mode we don’t show the box, since it’s more likely to
be an intentional duplicate launch)
2018-01-12 22:18:59 +00:00
James Turner
1681b92c31 Silence a clang warning 2018-01-12 22:18:59 +00:00
James Turner
b4cdac238e remove_if clean-ups while auditing :) 2018-01-12 22:18:59 +00:00
James Turner
1493c0adc8 Fix missing style import in the delegate 2018-01-12 22:18:59 +00:00
Henning Stahlke
cbd5cb916f YASim bugfix: XML processing failed if <control-speed> appeared before <control-input> in XML file. 2018-01-10 21:25:52 +01:00
Florent Rougon
451f41fe0c Add-ons: lower the priority of the add-on resource provider to PRIORITY_DEFAULT
The previous priority was PRIORITY_NORMAL, which happens to be higher
than PRIORITY_DEFAULT. Even though the add-on resource provider should
be quite fast at rejecting resource paths that don't start with
'[addon=', I currently can't see any reason that justifies to give it a
higher priority than other paths added to the simgear::ResourceManager
with addBasePath(..., PRIORITY_DEFAULT).
2018-01-10 16:21:34 +01:00
Florent Rougon
39bf5d6b8a Add-ons: add fallback code for compilers without working <regex>
This is another place where the add-on code uses regexps, and so far I
had forgotten to add the fallback code for compilers that don't support
<regex> as per the C++11 standard.
2018-01-10 10:03:56 +01:00
Florent Rougon
1f2ba814a4 Add-ons: silence a compilation warning
Fix mismatch of 'struct' vs. 'class' keyword in declaration and
definition of Addon::Metadata.
2018-01-10 08:17:24 +01:00
Florent Rougon
5f50e25535 Add-ons: add method resourcePath() to addons.Addon ghosts
This method takes a string such as "this/is/a/relative/path" and returns
"[addon=ADDON_ID]this/is/a/relative/path", substituting the add-on
identifier for ADDON_ID.

This way, add-on authors don't even have to know the special syntax
'[addon=ADDON_ID]relative/path' used for add-on-specific resource paths,
and don't need to hardcode their add-on identifier inside each such path
either.
2018-01-10 01:25:50 +01:00
Florent Rougon
717fdfec39 Add-ons: register the add-on ResourceProvider with the simgear::ResourceManager
This makes it possible to look up files from add-on directories using
for instance FGGlobals::resolve_resource_path(), passing a string such
as "[addon=ADDON_ID]relative/path" as explained in the previous commit.
2018-01-10 01:25:36 +01:00
Florent Rougon
8c82fca416 Add-ons: add a simgear::ResourceProvider for add-on-specific lookup
A resource can be specified with the syntax:

  [addon=ADDON_ID]relative/path

Such a resource corresponds to the file $addon_base_path/relative/path
for the specific add-on whose identifier is ADDON_ID.

If the particular add-on isn't registered, looking up such a resource
throws sg_exception.
2018-01-10 01:25:36 +01:00
Florent Rougon
a137aed541 Add-ons: move parsing of the metadata file to a separate translation unit
This will be tidier, esp. since I am going to introduce another XML
config file.
2018-01-10 01:25:36 +01:00
Florent Rougon
4ed99dd05c Add-ons: make Addon::getMetadataFile() a private member function 2018-01-10 01:25:36 +01:00
Thomas Geymayer
7c8ab6c52a Update for nasal::Context changes 2018-01-09 23:22:55 +01:00
Florent Rougon
a999b87e06 Add-ons: rename ContactTraits to contact_traits for style consistency
This will be consistent with other traits classes such as
shared_ptr_traits (in flightgear::addons as well as in nasal
namespaces).
2018-01-08 08:05:35 +01:00
Florent Rougon
59d8dea0d7 Add-ons: use shared_ptr_traits<>::makeStrongRef(...) instead of new Foobar(...)
Replace the previously-written manual calls to "new SomeClass(...)" with
their equivalent using
flightgear::addons::shared_ptr_traits<>::makeStrongRef(). This way, when
SomeClassRef is changed from SGSharedPtr<SomeClass> to
std::shared_ptr<SomeClass>, these calls will magically use
std::make_shared<SomeClass>(...) instead of the "new SomeClass(...)"
call.
2018-01-08 08:05:35 +01:00
James Turner
d2cb99ba1d Launcher: fixes for scanning local aircraft dirs
When multiple ‘added items’ signals occur, don’t loose some entries,
always pull the full list from the aircraft cache.
2018-01-07 14:19:28 +00:00
James Turner
178c6440f6 Permit three-letter (FAA) airport identifiers
Patch from Jean-Paul Anceaux to allow some FAA but non-ICAO airports to
be used with the route-manager dialog.
2018-01-05 16:39:34 +00:00
Richard Harrison
97c1b34fa5 JSBSim: revised arrestor wire handling.
Change the arrestor wire handling as follows;

- expose property to indicate when arrestor wire has been snagged: /fdm/jsbsim/systems/hook/arrestor-wire-engaged-hook
- add property to allow the model to request that the wire is released: /fdm/jsbsim/systems/hook/tailhook-release-cmd. This permits an overspeed approach to catch the wire and then drop it.
2018-01-04 03:54:23 +01:00
Richard Harrison
2f84be16f9 Multiplayer: Do not interpolate integer values:
Jean Pellotier, 2018-01-02 : we don't want interpolation for integer values, they are mostly used
for non linearly changing values (e.g. transponder etc ...)
ref: https://sourceforge.net/p/flightgear/codetickets/1885/
2018-01-04 03:54:23 +01:00
Florent Rougon
4d36082398 Add-ons: detailed, machine-parseable metadata for authors and maintainers
(everything described here lives in the namespace flightgear::addons)

New classes: Author, Maintainer, and Contact. Author and Maintainer
derive from Contact. For each contact, the following can be defined in
addon-metadata.xml: name, email, and url. See [1] for details about the
syntax and usage policy. Nasal bindings have been updated accordingly,
there are three new ghosts: addons.Contact, addons.Author and
addons.Maintainer.

The enum class UrlType has two new members: author and maintainer. The
Addon::getUrls() method has a new signature:

  std::multimap<UrlType, QualifiedUrl> getUrls() const;

because non-empty 'url' fields for authors and maintainers contribute to
the result, and there can be an arbitrary number of authors and an
arbitrary number of maintainers defined for a given add-on---therefore,
std::map can't be used anymore.

Finally, QualifiedUrl has a new field (detail) which stores the author
name (resp. maintainer name) when the QualifiedUrl type is
UrlType::author (resp. UrlType::maintainer). Currently, this 'detail'
field is not used for other URL types, but this could be changed if
desired.

[1] https://sourceforge.net/p/flightgear/fgdata/ci/next/tree/Docs/README.add-ons
2018-01-02 21:57:35 +01:00
Florent Rougon
843383fdc3 Add-ons: add pointer traits
flightgear::addons::shared_ptr_traits allows one to easily switch for
instance from an SGSharedPtr<T> to an std::shared_ptr<T> for "all" uses
of a particular T, and automatically have std::make_shared<T>(...) used
instead of SGSharedPtr<T>(new T(...)) when creating a shared instance of
T. This is interesting because std::make_shared<T>() allocates all
needed memory as one block, whereas std::shared_ptr<T>(new T(args...))
would perform at least two allocations (one for the object T and one for
the control block of the shared pointer).

This is done via static methods (one for each kind of smart pointer):

  shared_ptr_traits<SGSharedPtr<T>>::makeStrongRef()
  shared_ptr_traits<std::shared_ptr<T>>::makeStrongRef()

that forward their arguments in the same way as std::make_shared<T>().
2018-01-02 00:35:50 +01:00
Florent Rougon
f1e0a4e43f Add-ons: add missing include 2018-01-01 20:04:59 +01:00
Florent Rougon
7d2f35c7e3 Add-ons: update namespace in a string and a comment
These were forgotten in commit f5ab26bd71.
2018-01-01 01:14:37 +01:00
Florent Rougon
31de119169 Add-ons: alternative code for C++ compilers that don't have a working <regex>
Normally, <regex> should be available and working in any compliant C++11
implementation, however at least g++ 4.8[1] lies about its C++11
compliance: its <regex> is utterly unusable, see [2] and [3] for
details.

This requires SimGear commit ab1e2d49abdf5b1aca9035a51d9d73d687f0eba7,
for the HAVE_WORKING_STD_REGEX preprocessor symbol.

[1] Which appears to be (precisely 4.8.5) the version shipped in
    CentOS 7, and used on FlightGear's current Jenkins installation.

[2] https://stackoverflow.com/a/12665408/4756009

[3] https://sourceforge.net/p/flightgear/mailman/message/36170781/
2017-12-29 14:14:41 +01:00
Florent Rougon
ea45c4980b Merge /u/jsb1685/flightgear/ branch yasim into next
https://sourceforge.net/p/flightgear/flightgear/merge-requests/115/
2017-12-29 08:26:24 +00:00
Henning Stahlke
21aef4da70 YASim: bugfix for wing section (wrong surface positions).
Reformated and extended output of CLI tool.
2017-12-29 08:16:32 +01:00
Florent Rougon
3d12ed6ce0 Add-ons: minor changes
Changes to test_AddonManagement.cxx:

  - in testAddonVersionSuffix(), fgtest::initTestGlobals() was called
    with the wrong test name (not used anyway, but might be in the
    future);

  - in testAddon():
      * rename variable 'm' to 'addon' ('m' used to stand for the old
        class name AddonMetadata);
      * call fgtest::initTestGlobals() and fgtest::shutdownTestGlobals()
        (not technically needed, but cleaner).
2017-12-28 08:35:39 +01:00
Richard Harrison
8cfa799284 Multiplayer: add properties for Emesary MP bridge.
- The Emesary MP bridge can use any string property; however it seems sensible to separate the properties out into a distinct block.
- There is a now a type property for each bridge. This is to allow the bridge to identify its type based on what it can transfer based on function. This will allow rapid filtering of unrequired notifications within the bridge (NYI)
2017-12-28 01:12:20 +01:00
Florent Rougon
ccfb0d78ae Add-ons: whitespace-strip every leaf node contents in addon-metadata.xml files
All nodes were already stripped except <version>, <min-FG-version> and
<max-FG-version>; these are the ones affected by this change.
2017-12-26 19:45:19 +01:00
Florent Rougon
ec349c6ac5 Add-ons: add UrlType enum class, QualifiedUrl class and Addon::getUrls() method
QualifiedUrl is essentially a pair containing an enum value
(addons::UrlType::homePage, addons::UrlType::download, etc.) and an
std::string for the URL per se, with adequate getters and setters.

Addon::getUrls() is for people who wish to process all non-empty URLs
occurring as part of the add-on metadata in batch.

Mailing-list discussion:

  https://sourceforge.net/p/flightgear/mailman/message/36159711/
2017-12-26 19:44:15 +01:00
Florent Rougon
f5ab26bd71 Add-ons: move all code to the flightgear::addons namespace 2017-12-26 19:44:15 +01:00
Florent Rougon
c3b1442546 Add-ons: new supported fields: authors, maintainers, license/*, url/*, tags
- Parsing of the addon-metadata.xml file is now handled by a new static
  method of Addon:

    static Addon fromAddonDir(const SGPath& addonPath);

  This method will be reusable to gather all add-on metadata from a set
  of add-on directories (just call the method once per add-on). This
  change also simplifies AddonManager::registerAddonMetadata().

- New supported fields:

    authors
    maintainers
    license/{designation,file,url}
    url/{home-page,download,support,code-repository}
    tags

  See
  https://sourceforge.net/p/flightgear/fgdata/ci/next/tree/Docs/README.add-ons
  for documentation on these fields.

Mailing-list discussion:

  around https://sourceforge.net/p/flightgear/mailman/message/36155660/
2017-12-26 19:43:20 +01:00
Florent Rougon
d81599efd1 Add-ons: move exceptions to their own translation unit 2017-12-25 21:24:26 +01:00
James Turner
01f0f27c84 HID-input: don’t crash when open fails
Important since hidraw devices need special permissions on Linux.
2017-12-25 18:13:03 +00:00
Henning Stahlke
2538ab717a YASim: more output for CLI tool, e.g. wingspan, area, levers, load factor... 2017-12-23 01:06:38 +01:00
Florent Rougon
c325a8d2cd Fix typos in src/Input/FGLinuxEventInput.cxx 2017-12-23 00:04:21 +01:00
James Turner
216d2328a3 Linux fixes 2017-12-22 14:44:29 -08:00
James Turner
fed8ce623b Fix Windows compilation. 2017-12-22 15:48:52 +00:00
Henning Stahlke
7e5a1bb6b9 try to fix windows build error 2017-12-21 18:56:29 +01:00
James Turner
34630f935d Fix GCC indentation warning 2017-12-20 04:04:17 -08:00
James Turner
407a6d4b3e Linux fixes for HID-input 2017-12-20 04:04:17 -08:00
James Turner
edc1d63b26 Merge /u/jsb1685/flightgear/ branch yasim2 into next
https://sourceforge.net/p/flightgear/flightgear/merge-requests/110/
2017-12-19 23:06:03 +00:00
Henning Stahlke
9289c79e05 YASIM reduce precision of lift/drag output from CLI tool to .4 2017-12-19 08:44:41 +01:00
Henning Stahlke
87149931dd YASim refactoring parser 2017-12-19 08:44:41 +01:00
Henning Stahlke
7c55aa2c4a YASim variable and method name clarification in class Surface 2017-12-19 08:44:41 +01:00
Henning Stahlke
f7c5d2b1f9 YASIM refactoring class Surface
and export more properties to proptree
2017-12-19 08:44:41 +01:00
Henning Stahlke
408e645bb2 YASIM add wing section support
refactoring of FGFDM parser
replace old helpers with lib functions from <cstring>
remove typecast that kills 'const'
add some comments and clarify variable names
2017-12-19 08:44:41 +01:00
James Turner
e630bc4be7 Make HID-Input test also conditional
Forgot to wrap this in the relevant CMake test, causing non-HID-input
builds to erroneously fail.
2017-12-18 18:22:44 +00:00
James Turner
e920dc7509 Event input layer based on HID-Api
Thus runs in parallel to the existing implementation on Linux and Mac,
but can (soon) replace the Mac code and will run on Windows eventually.
2017-12-18 17:15:55 +00:00
James Turner
d98cd3a717 Launcher: move QML files to a sub-directory 2017-12-15 14:38:23 +00:00
James Turner
f964728422 Launcher aircraft list: show counts 2017-12-15 14:38:23 +00:00
James Turner
595b0d16da Launcher aircraft: fix a layout bug 2017-12-15 14:38:23 +00:00
Henning Stahlke
e913e44aa0 YASIM type name clarification 2017-12-15 15:20:29 +01:00
Henning Stahlke
13e00b275b YASim: export more forces to prop tree for in flight debugging 2017-12-15 15:20:29 +01:00
Henning Stahlke
a199ca817c YASim: user Math functions in RigidBody 2017-12-15 15:20:29 +01:00
Henning Stahlke
abb451256d YASim CLI tool: add more CG outputs
remove non-significant digits from inertia printf()
2017-12-15 15:20:29 +01:00
Henning Stahlke
78f7950fa6 YASim: move common helper functions to new yasim-common.cpp 2017-12-15 15:20:28 +01:00
Henning Stahlke
c63ded1c44 YASIM add initialization
use Math::clamp in ControlMap
2017-12-15 15:20:28 +01:00
Henning Stahlke
b2000e1cca YASIM add a local var 2017-12-15 15:20:28 +01:00
Henning Stahlke
5aead123fc YASIM refactoring of ControlMap 2017-12-15 15:20:28 +01:00
Henning Stahlke
09c60ee40e YASIM add variable initialization 2017-12-15 15:20:28 +01:00
Henning Stahlke
3809137f7d YASIM add method multiplyLiftRatio to class Wing 2017-12-15 15:20:28 +01:00
Henning Stahlke
6feca92060 YASIM add struct StallParams to Wing 2017-12-15 15:20:27 +01:00
Henning Stahlke
b288ca3d9d YASIM: add struct Chord to Wing.hpp ; add static method calculateMAC to Wing 2017-12-15 15:20:27 +01:00
Henning Stahlke
6b473fde68 YASIM: move updating of model from Airplane to Wing 2017-12-15 15:20:27 +01:00
Henning Stahlke
fb6f965db7 YASIM: method name clarification (and indention) 2017-12-15 15:20:27 +01:00
Henning Stahlke
0e6552cddf YASIM: move property export code into classes (Wing) 2017-12-15 15:20:27 +01:00
Henning Stahlke
43af435085 YASIM: rename method getMAC to getMACLength 2017-12-15 15:20:27 +01:00
Henning Stahlke
c3bfeb4ba0 YASIM only reformat for better readability 2017-12-15 15:20:27 +01:00
Henning Stahlke
030403db5f YASIM member initialization in class Vector 2017-12-15 15:20:26 +01:00
Henning Stahlke
1194b09525 YASIM rename methods in class Surface 2017-12-15 15:20:26 +01:00
Henning Stahlke
1f721fb6d8 YASIM add new version tag for 2018.1 2017-12-15 15:20:26 +01:00
Henning Stahlke
77a9cca6d5 YASIM refactoring Wing class (flaps) 2017-12-15 15:20:26 +01:00
Henning Stahlke
95ee37c9b9 YASIM refactoring of Wing class 2017-12-15 15:20:26 +01:00
Henning Stahlke
3ac90ee866 YASIM: minor corrections and safeguards. 2017-12-15 15:20:26 +01:00
Henning Stahlke
ea8bfba98a YASim: add method to Wing and clarify member name. 2017-12-15 15:20:25 +01:00
Florent Rougon
c28f63132f Re-add airport(), navaid() and runway() methods of flightplan-leg ghosts
These methods were removed by mistake in commit 0dbb0dff9, which broke
code that relies on them (e.g., FMSDelegate.currentWaypointChanged() in
$FG_ROOT/Nasal/route_manager.nas).

Also remove 'waypointPrototype' from NasalPositioned.cxx, since it is
not used anymore.

Note: the methods can't be easily re-enabled by means of
      'waypointPrototype', because for FPLeg ghosts, 'waypointPrototype'
      was emulated as a parent class before this commit, and thus when
      querying an FPLeg ghost for its 'airport', 'runway' or 'navaid'
      member, the corresponding data member returned by
      waypointCommonGetMember() would be found by legGhostGetMember()
      *before* parent classes are searched. This commit prevents this
      from happening by returning 'airport', 'runway' and 'navaid' as
      member functions *directly* in legGhostGetMember(), before
      waypointCommonGetMember() is queried as a fallback.

Thanks to Eric van den Berg for the bug report.
2017-12-13 11:39:05 +01:00
Florent Rougon
b769ee6fdc AddonManager::registerAddonMetadata(): improve error messages 2017-12-10 22:41:03 +01:00
Florent Rougon
45867058f0 addon-metadata.xml: add meta section (non-leaf node) and file-type node
Move the format-version node inside /meta. It's not compatible of
course, but since the stuff this is breaking is only 2 or 3 days old,
let's go for it for nicer code and file format.

Sorry if you had already written an addon-metadata.xml file of your
own. In this case, just replace:

  <format-version type="int">1</format-version>

with:

  <meta>
    <file-type type="string">FlightGear add-on metadata</file-type>
    <format-version type="int">1</format-version>
  </meta>
2017-12-10 22:41:03 +01:00
James Turner
88940eb6bc Launcher: fix some warnings from QML 2017-12-09 09:46:14 +00:00
James Turner
58fa9fcaa7 Launcher: fix for unreliable aircraft-dir scanning 2017-12-09 09:32:25 +00:00
James Turner
d127a6ff9a Launcher: fix on-disk variant enumeration 2017-12-08 23:18:42 +00:00
Florent Rougon
3985bf4b19 Fix compilation error in src/Add-ons/AddonVersion.cxx
This should fix the following compilation error and other similar ones:

  converting to ‘std::tuple<flightgear::AddonVersionSuffixPrereleaseType,
  int, bool, int>’ from initializer list would use explicit constructor
  ‘constexpr std::tuple< <template-parameter-1-1> >::tuple(_UElements&&
  ...)

According to <https://stackoverflow.com/a/32084829/4756009>, the change
wouldn't be needed in C++14 (and it built fine with my g++) but we use
C++11.
2017-12-08 18:39:27 +01:00
James Turner
e6e055dbb0 Launcher: preview image loading feedback
Expose the loading state as a property so the UI can show some feedback
when the image is still loading.
2017-12-08 16:14:47 +00:00
James Turner
033d5f65d5 Usability tweaks for editing ratings
Adjust ratings text now has mouse hover, and sliders can be clicked
on the track to adjust the value directly
2017-12-08 16:14:47 +00:00
Florent Rougon
48f52f14c4 Improved infrastructure for add-ons: C++ classes, metadata file, Nasal interface
This commit adds C++ classes for add-on management, most notably
AddonManager, Addon and AddonVersion. The AddonManager is used to
register add-ons. It relies on an std::map<std::string, AddonRef> to
hold the metadata of each registered add-on (keys of the std::map are
add-on identifiers, and AddonRef is currently SGSharedPtr<Addon>).
Accessor methods are available for:

  - retrieving the list of registered or loaded add-ons (terminology
    explained in $FG_ROOT/Docs/README.add-ons);

  - checking if a particular add-on has already been registered or
    loaded;

  - for each add-on, obtaining an Addon instance which can be queried
    for its name, id, version, base path, the minimum and maximum
    FlightGear versions it requires, its base node in the Property Tree,
    its order in the load sequence, short and long description strings,
    home page, etc.

The most important metadata is made accessible in the Property Tree
under /addons/by-id/<addon-id> and the property
/addons/by-id/<addon-id>/loaded can be checked or listened to, in
order to determine when a particular add-on is loaded. There is also a
Nasal interface to access add-on metadata in a convenient way.

In order to provide this metadata, each add-on must from now on have in
its base directory a file called 'addon-metadata.xml'.

All this is documented in much more detail in
$FG_ROOT/Docs/README.add-ons.

Mailing-list discussion:

  https://sourceforge.net/p/flightgear/mailman/message/36146017/
2017-12-08 00:36:41 +01:00
James Turner
ac50a3c7ed Restore OSG 3.2 compilation support 2017-12-05 21:39:30 +00:00
James Turner
3ffed7d867 Style singleton for the QML UI 2017-12-05 21:30:09 +00:00
James Turner
31c781257b Remove obsolete UI files 2017-12-04 22:34:39 +00:00
James Turner
d34edaa569 Pure QtQuick aircraft-UI
Moves previews, searching, rating handling and extended aircraft
information entirely into QQ. Many cosmetic tweaks and improvements
still to come.
2017-12-04 22:34:39 +00:00
James Turner
041b9527d3 Seperate aircraft cache from the model.
Allows exposing aircraft data to QML (via a helper object) outside the
context of the model.
2017-12-04 21:48:20 +00:00
James Turner
78950fea57 Fix crash on reset if terrasync is disabled
Also use C++11 iteration for group names in reset start code.
2017-12-04 21:41:05 +00:00
James Turner
5dcfdf593a Merge /u/sanhozay/flightgear/ branch sanhozay into next
https://sourceforge.net/p/flightgear/flightgear/merge-requests/101/
2017-11-27 17:09:04 +00:00
ThorstenB
147ff104cd Adds support for NMEA messages for traffic reporting (flarm). Also extends the NMEA base class to handle bidirectional communication. Allows FlightGear to feed position and traffic data (for multi-player and AI aircraft) to NAV/moving-map clients, like xcsoar, skydemon, skymap etc. Some basic flarm configuration commands are also emulated, to properly persuade the clients. By default, all moving aircraft are reported (traffic information). Actual threat-alerts are also supported, but require the installation of the "TCAS instrument". 2017-11-24 22:54:32 +01:00
Gijs de Rooy
8ca9dd89c9 QtLauncher: fix aircraft ratings
Index of rating indicators starts at 0 while ratings that correspond to a point/star/dot start at 1
2017-11-22 16:35:21 +01:00
ThorstenB
ad866afd81 Revised nmea and Garmin protocol classes.
The Garmin protocol implementation really is an NMEA protocol with a few
extra messages. Instead of duplicating the code, introduce the NMEA protocol
as a base class, which is reused for the Garmin class. The input/output
has not changed at all (and it maintains the FG-specific quirks, like our
NMEA class using LF-only linefeeds, while the Garmin protocol uses
CR-LF linefeeds.
2017-11-19 17:33:27 +01:00
ThorstenB
6ff4805361 TCAS: add default value when checking valid flag 2017-11-19 17:32:49 +01:00
ThorstenB
19b19f05bd Correct range checks for network protocol parameters.
Several checks were off by one, resulting in a segfault when only one
parameter was missing.
Also improve error messages, giving details about what is expected.
2017-11-19 17:30:12 +01:00
ThorstenB
27e2776890 Minor cleanup in parse_port_config. 2017-11-19 17:30:05 +01:00
Florent Rougon
94a8ba8f9b Add missing space in a log message 2017-11-19 11:14:51 +01:00
Florent Rougon
83fef08a04 Use common definition of simgear::enumValue() from <simgear/sg_inlines.h>
This avoids code duplication.
2017-11-19 08:23:14 +01:00
Florent Rougon
0537d569d5 Remove method FGAirport::isAirportType()
FGAirport::isAirportType() was redundant with
FGPositioned::isAirportType(). Remove the former and change existing
calls to use the latter.
2017-11-16 20:28:00 +01:00