1
0
Fork 0
Commit graph

13323 commits

Author SHA1 Message Date
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
8e6500ae47 Orderly destruction of canvas elements
Driven from the object destroyed signal, ensure children and 
corresponding QQ items are also destroyed when the property is removed.
2017-11-28 22:54:12 +00:00
James Turner
e4b5a699d8 Remote canvas: fix crashes on remove 2017-11-28 22:32:30 +00:00
James Turner
731097bca3 Remote canvas: fix snapshot loading
Visibility prop was being saved incorrectly.
2017-11-28 16:20:23 +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
James Turner
d638e7a73b Merge /u/thbr/flightgear/ branch tb-next into next
https://sourceforge.net/p/flightgear/flightgear/merge-requests/107/
2017-11-20 19:44:33 +00:00
James Turner
089abcfe40 Fix FGQCanvas compilation with Qt 5.7
Use raw OpenGL type constants instead of the QSG aliases which were
only added in 5.8
2017-11-19 21:57:14 +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
Florent Rougon
a2254d891a Add missing include <algorithm> for std::max() and std::min()
<algorithm> was missing in src/AIModel/AIFlightPlanCreate.cxx and
src/Navaids/routePath.cxx. Thanks again to Alan Teeder for the reports!
2017-11-16 12:54:49 +01:00
Florent Rougon
0dbb0dff9e Three Nasal properties of waypoint objects now accessible: airport, runway, navaid
Waypoint objects used in Nasal code can now return their airport,
runway or navaid object (Nasal ghost). More precisely:
  - if waypoint 'wpt' was made from an airport object[1], then
    'wpt.airport' is this airport object;
  - if waypoint 'wpt' was made from a runway object[2], then
    'wpt.runway' is this runway object, and 'wpt.airport' is the
    airport containing that runway;
  - if waypoint 'wpt' was made from a navaid object[3], then
    'wpt.navaid' is this navaid object.

When one of the three properties 'airport', 'runway', and 'navaid' is
not applicable to a given waypoint due to the type of the underlying
FGPositioned, its value is nil.

The code for these properties was already mostly there, but
unreachable from Nasal.

[1] For instance, with createWPFrom(airportinfo("LOWI"))

[2] For instance, with createWPFrom(airportinfo("LOWI").runway("26"))

[3] For instance, with:

      var apt = airportinfo("LOWI");
      var navaid = findNavaidByFrequencyMHz(apt, 109.7);
      var navaidWpt = createWPFrom(navaid);
2017-11-16 11:22:39 +01:00
Florent Rougon
91470cbc54 Add FGPositioned static methods: isAirportType(), isRunwayType(), isNavaidType()
For consistency, define these three static methods in FGPositioned.
FGPositioned::isAirportType() is the same as FGAirport::isAirportType()
(piece of code moved from airport.cxx to positioned.cxx, and
FGAirport::isAirportType() now calls FGPositioned::isAirportType()).

- FGPositioned::isAirportType() returns true for AIRPORT, HELIPORT,
  SEAPORT;
- FGPositioned::isRunwayType() returns true for RUNWAY;
- FGPositioned::isNavaidType() returns true for NDB, VOR, ILS, LOC, GS,
  DME, TACAN.
2017-11-16 11:22:39 +01:00
Florent Rougon
9d4cbb005f Update header comment of src/Airports/airport.cxx 2017-11-16 11:22:39 +01:00
Florent Rougon
e68e73d252 Add missing include <algorithm> for std::max()
<algorithm> was missing in src/Instrumentation/airspeed_indicator.cxx
and src/Instrumentation/tacan.cxx. Thanks to Alan Teeder for the
reports.
2017-11-16 11:20:24 +01:00
James Turner
fc084f4f1b Raise minimum version for FGQCanvas to Qt 5.7
Unfortunately QQuickTextNode isn’t exported from the libraries until
Qt 5.7, so rendering text directly would be very awkward.
2017-11-16 10:02:26 +00:00
James Turner
3b18a3667b Fix offsetting in FGQCanvas, enable clipping
Visual output is nearly correct now, just some crashes when changing
the display contents to track down.
2017-11-16 09:24:07 +00:00
James Turner
8fc04fdfb3 Fix Windows build for launcher changes 2017-11-15 22:04:03 +00:00
James Turner
2d663f2509 Fix crash with adding catalogs in the launcher
Change how we get notified about catalog changes, so we can remove
our hook and hence not leave a dangling pointer.

Fixes https://sourceforge.net/p/flightgear/codetickets/1994/
2017-11-15 21:46:57 +00:00
James Turner
7305b20483 Hopefully pacify GCC 4.8.x 2017-11-15 21:18:24 +00:00
James Turner
72ca36535a Fix the PUI map ruler feature, use right-click
The OSG Ctrl to right-click mapping was breaking this on Mac, but
changing that will break other things, so move the ruler feature from
‘ctrl left click’ to a simple ‘right click’ which ends up being the
same on Mac anyway.
2017-11-15 17:02:25 +00:00
James Turner
723e631f87 Restore PUI scrolling event behaviour
Fixes zooming in the map, for example.
2017-11-15 16:35:07 +00:00
James Turner
15fbf1f9cd Merge /u/thbr/flightgear/ branch next into next
https://sourceforge.net/p/flightgear/flightgear/merge-requests/106/
2017-11-15 08:01:07 +00:00
ThorstenB
cae4523d97 Completely removed obsolete debug code
as suggested by James.
2017-11-14 20:39:27 +01:00
ThorstenB
5f994c94b9 TCAS: do not process invalid AI models 2017-11-14 20:39:13 +01:00
James Turner
78bacefb60 Advanced weather support in the launcher 2017-11-14 17:54:22 +00:00
James Turner
daedf1e546 PUI dialog correct positioning on HiDPI displays
Apply the device-pixel-ratio when calculating the initial position of
PUI dialogs, so they appear correctly (eg, centered) when running with
device-pixel-ratio != 1.0
2017-11-14 17:30:31 +00:00
James Turner
b870b3f022 Fix wrong launcher aircraft name on startup
The mapping from aircraft URI to name was wrong for local (non-package)
aircraft, as spotted by Thorsten Renk. Note other data (thumbnail) is
still incorrect, but another change I have pending will replace this 
code anyway so only doing the simple fix for now.
2017-11-14 17:30:31 +00:00
ThorstenB
6077ef8cdd Remove unused copy&pasted nmea code from other protocol's source. 2017-11-13 20:40:41 +01:00
ThorstenB
f6ce434241 Disabled forgotten debug output. 2017-11-13 20:40:36 +01:00
ThorstenB
dd7d54cfcc Do not crash when specifying an unsupported transport medium for an I/O protocol. 2017-11-13 20:40:23 +01:00
Florent Rougon
2bf5a96aec Add two missing includes for <algorithm> 2017-11-13 15:58:08 +01:00
James Turner
9eaa2f7efc Missed build fix for FGQCanvas 2017-11-09 16:01:21 +02:00
James Turner
329f8f77ab Fix broken private header detection 2017-11-09 15:34:44 +02:00
James Turner
89827fcd96 Restoring snapshots nearly working 2017-11-09 12:33:33 +02:00
James Turner
157b2148cb Add snapshots UI 2017-11-08 15:36:07 +02:00
James Turner
3c1cb67a27 Remove old FGQCanvas files 2017-11-07 17:23:55 +02:00
James Turner
a184f532ce Clipping support in all elements 2017-11-07 17:20:42 +02:00
James Turner
a22a17a995 Further work on snapshots feature 2017-11-05 19:42:57 +00:00