Commit Graph

285 Commits

Author SHA1 Message Date
Mat Sutcliffe
6c05c5249d When calling arg() on a QString constructed from a literal, use QStringLiteral. 2019-02-22 20:23:47 +00:00
Mat Sutcliffe
4344ca1a77 Suppressed clazy false positives: method potentially mismarked as slot. 2019-02-22 20:23:39 +00:00
Mat Sutcliffe
8979b5257e Fixed clazy warnings: returning void expression. 2019-02-22 20:23:34 +00:00
Mat Sutcliffe
e32ea65a27 Fixed clazy warnings: fully-qualified signal parameter types. 2019-02-22 20:23:34 +00:00
Klaus Basan
40ae7174a7 Ref T470, detect NULL cg 2018-12-14 19:57:29 +01:00
Klaus Basan
f841d57448 Avoid crash by checking disconnected before requesting elevation 2018-12-11 21:34:14 +01:00
Roland Rossgotterer
74e084c6e8 Compare transponder and not only the transponder code
The last refactoring introduced a bug causing only X-Plane transponder code changes to be detected by swift - transponder modes were ignored.
2018-12-11 17:42:51 +01:00
Klaus Basan
c591728e88 Aircraft ICAO code of own model is wrong
Although the reverse lookup of a model is correct, it's aircraft ICAO code is wrong

Issues found

* in the driver the ICAO code is permanently overridden -> commented out
* there are two contexts, own aircraft and simulator, but only one uses reverse lookup -> now both
* using Qt::QueuedConnection for context -> GUI
2018-12-11 00:51:31 +01:00
Roland Rossgotterer
c27d401e70 Remove SystemBus from XSwiftBus connection options 2018-11-29 20:54:26 +01:00
Roland Rossgotterer
db7ed76bc5 Refactor listening for and connecting to XSwiftBus
- Use common function for Session and P2P connections
- Don't use the DBus service watcher as it did not allow to test in regular intervals
- Add a XSwiftBus version check to X-Plane listener
- Try to initialize and acquire multiplayer planes in checkConnection() already and warn the user if any of those failed. The plugin will be loaded only if everything succeeded.
2018-11-29 20:54:26 +01:00
Roland Rossgotterer
49bd38d722 [XSwiftBus] Add hasMultiplayerPlanesAquired() DBus API
This function will return whether X-Plane multiplayer planes have been acquired by XSwiftBus or if not, who else acquired them.
2018-11-29 20:54:26 +01:00
Roland Rossgotterer
55c2e2e559 [XSwiftBus] Add getVersionNumber to DBus API
This allows to get the version number of XSwiftBus itself. It maintains the same version as swift (e.g. 0.8.7 without the time stamp) and can be used to compare it for compatibility reasons.

ref T394
2018-11-29 20:54:26 +01:00
Roland Rossgotterer
ec8245ea53 [XSwiftBus] Give PQ variables a unit
ref T313
2018-11-29 20:54:26 +01:00
Klaus Basan
64b0ec87b1 Ref T423, changed strategy to force position updates
* force update for "some time", and remove all sent information
* no longer update some cycles, but for some time
* updated FSX/P3D/XPlane drivers
2018-11-16 02:49:52 +01:00
Klaus Basan
2b8e388ba1 Ref T423, force update if simulator was paused or interrupted before
* force full updates for some cycles "m_updateAllRemoteAircraftCycles"
* only use "emitSimulatorCombinedStatus" to emit changed simulator status
* renamed to "finishUpdateRemoteAircraftAndSetStatistics"
* override "forced" in "getInterpolationSetupConsolidated"

This addresses the issue that aircraft appear below ground after moving the aircraft
2018-11-06 01:41:47 +01:00
Klaus Basan
93bcbc0755 Ref T421, function to get interpolation messages from the simulator drivers 2018-11-04 17:42:47 +01:00
Roland Winklmeier
92790f1330 Refactor updateCockpit from X-Plane
X-Plane returns com frequencies in 10 kHz, so we don't have the necessary
precision for the 25 kHz spacing. By using CComSystem::setFrequencyActive
we get the rounding to the system wide spacing for free.
Without that correction we run into system wide issues in code that assumes
the correct frequency spacing is in place.

ref T399
2018-11-04 17:42:42 +01:00
Roland Winklmeier
c72742029b [XSwiftBus] Set transponder info for all rendered aircraft
Without setting the transponder, no TCAS rendering is possible.

ref T374
2018-10-05 17:39:44 +02:00
Roland Winklmeier
616cc241f4 [XSwiftBus] Convert setPlanesTransponders to list setter
ref T374
2018-10-03 03:03:41 +02:00
Klaus Basan
a871579479 Ref T370, added public removeAllRemoteAircraft
* protected clearAllRemoteAircraftData
* ISimulator::clearAllRemoteAircraftData no longer calls clearAllRemoteAircraftData (circular)
2018-09-25 02:14:00 +02:00
Roland Winklmeier
fe97276ee8 Set X-Plane major and minor version in simulator details
ref T339
2018-09-17 18:28:23 +02:00
Klaus Basan
7e9f3a6c7f Ref T342, distance of airport can be recalculated 2018-09-12 17:40:38 +02:00
Roland Winklmeier
3804612bed Fix the initial weather request in case last position is null
calculateGreatCircleDistance returns false immediately if any of the
arguments was null.

ref T324
2018-09-12 17:01:51 +02:00
Klaus Basan
68beaa6d9d Ref T312, added checkImpl/check in simulator listeners 2018-08-27 18:58:15 +02:00
Klaus Basan
15500c41db XPlane Clang/PQ integer fixes 2018-08-16 14:44:15 +02:00
Klaus Basan
359d56b6f6 Weather uses null altitude, https://swift-project.slack.com/archives/G7GD2UP9C/p1534378412000100 2018-08-16 14:44:14 +02:00
Roland Winklmeier
05e0480bb4 Move XPlane gnd flag handling from parts to situation
ref T276
2018-08-07 20:40:57 +02:00
Roland Winklmeier
488ff96ce6 Add DBus P2P support to XSwiftBus
ref T291
2018-08-07 20:40:43 +02:00
Roland Winklmeier
f881b118b6 Connect XSwiftBus signals manually in the proxy
This way we can check the return value and make sure that it is properly
connected.

ref T291
2018-08-07 20:40:38 +02:00
Roland Winklmeier
ee2b70ffcc Change argument type to double
DBus does not support float. This was not causing any error, because it
got implicitly converted.
2018-08-07 20:40:30 +02:00
Klaus Basan
fbfbdedb65 Ref T294, display simulator internals correctly
* view rows not selectable
* added settings to ISimulator
* ISimulator implements initSimulatorInternals() and sets default values
* also display plugin name
* XPlane using initSimulatorInternals()
2018-07-31 01:43:27 +02:00
Klaus Basan
14faf5136a Ref T268, XPlane testing showed: height has an influence on the returned elevation result
* the most accurate value seems to be returned if the height is close to the elevation
* in normal scenarios there is no much difference of the results if 0 is used
* in Lukla (9200ft MSL) the difference between 0 and 9200 is around 1ft
* in the LOWW scenario using 50000ft MSL results in around 3ft too low elevation
2018-07-19 02:52:16 +02:00
Klaus Basan
88098dddf7 Ref T268, allow to log loopback situations
* those are situations reported back from simulator
* and can be logged
2018-07-19 02:52:06 +02:00
Klaus Basan
52513db63f Ref T290, XPlane refactoring
* typo getRemoteAircraftsData -> getRemoteAircraftData (no "s")
* typo getEelevationAtPosition (double "Ee")
* get functions "const"
* added unit for some variables such as latitudeDeg
2018-07-17 19:04:50 +02:00
Klaus Basan
80cee12fdb Ref T246, utility for 1st model set directory
* remove empty enries in directories
* allow to add directory
* detect same directories and avoid duplicates
2018-07-14 19:45:21 +02:00
Klaus Basan
a508ad4ccb Ref T268, check in XPlane driver 2018-07-12 18:29:40 +02:00
Klaus Basan
d0adcc98cb Ref T289, merge CSimulatorCommonn/ISimulator 2018-07-12 18:29:36 +02:00
Klaus Basan
f8c64c0296 Ref T268, proxy style 2018-07-09 22:30:51 +02:00
Klaus Basan
df869373e8 Ref T268, XPlane driver improvements
* 2 queues, one for pending "to be added" aircraft and one for "adding in progress" (easier timeout detection)
* disconnect DBus when unloading
* check if aircraft "are still in range" before adding
* adding to XPlane only in one place
* data for aircraft can be explicitly request and are requested directly when an aircraft has been added
2018-07-09 22:30:48 +02:00
Klaus Basan
79c1691fdc Ref T268, Xplane driver style/renaming 2018-07-09 22:30:47 +02:00
Klaus Basan
1ba99b5392 Ref T268, XPlane to do not request updates of values "not near ground" 2018-07-09 22:30:44 +02:00
Klaus Basan
74b044bd19 Ref T268, removed obsolete functions as of https://swift-project.slack.com/archives/G7GD2UP9C/p1530707227000095 2018-07-09 22:30:39 +02:00
Klaus Basan
ca87784509 Ref T275, remember CG per model string 2018-07-09 22:30:22 +02:00
Klaus Basan
e6ac7eb4df Add Qt += network 2018-06-27 12:49:09 +02:00
Klaus Basan
bc0b4502cf Ref T275, move some simple implementations into ISimulator
Goal: merge CSimulatorCommon/ISimulator
2018-06-27 12:49:08 +02:00
Klaus Basan
0f931eeeb3 Ref T268, moved changeRemoteAircraftModel/Enabled to CSimulatorCommon and removed duplicated code 2018-06-13 14:00:09 +02:00
Klaus Basan
f3edf14186 Ref T273, Ref T275 XPlane uses simulator common function to skip sending equal parts/situations 2018-06-13 13:59:56 +02:00
Klaus Basan
181ed36f3d Ref T270, interpolator optimization by passing aircraft number
Rational: Except for FS9 we interpolate all aircraft in one loop at the same time. This can cause that some steps are always done at the same time for all aircraft of that loop. By passing the number we can more equally distribute such tasks, avoiding peaks.
2018-06-13 13:59:39 +02:00
Klaus Basan
aa7363dcad Ref T270, Ref T268, plugin common / simulator improvements
* connect with "about to quit"
* added interface declarations
* sim statistics, use common function setStatsRemoteAircraftUpdate and double for average values
2018-06-13 13:59:22 +02:00
Roland Winklmeier
654cc1621e Align the position and surface variable names to plural 2018-06-13 13:59:16 +02:00