1
0
Fork 0
Commit graph

14110 commits

Author SHA1 Message Date
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
James Turner
6156cbbe1d Fixes after merging branch 2017-11-05 14:04:17 +00:00
James Turner
78b0d9c91e Working on snapshot save/loading 2017-11-05 13:57:51 +00:00
James Turner
2a95e09a09 Enhanced git-ignore 2017-11-05 13:49:45 +00:00
James Turner
19fd8e6e26 WIP on clipping working 2017-11-05 13:49:33 +00:00
James Turner
045e6fb29a Fix image rendering, somewhat. 2017-11-05 13:47:15 +00:00
James Turner
70a199a2f5 Render text in Quick directly.
Uses private QQuickTextNode api.
2017-11-05 13:46:52 +00:00
James Turner
66543f1588 Fix support for Uint32 indices. 2017-11-05 13:41:46 +00:00
James Turner
905d8ae734 Text alignment support mostly working
Baseline is still being strange, possibly need to use an
AnchorChange instead of multiple Binding elements
2017-11-05 13:37:38 +00:00
James Turner
928fd31f2c Better image support in Quick-remote-canvas 2017-11-05 13:37:20 +00:00
James Turner
9af6e6cea0 Starting work on snapshots. 2017-11-05 13:21:28 +00:00
James Turner
c03d7b3c1f Remote-Canvas: nicer UI fades 2017-11-04 10:47:14 +00:00
James Turner
81a753cfa1 Delete and modify Remote-canvas configs 2017-11-04 10:09:08 +00:00
James Turner
623305965b Fix canvas sizing + scaling 2017-11-04 10:09:08 +00:00