Commit Graph

978 Commits

Author SHA1 Message Date
Roland Rossgotterer
9d1299741e [GFS] Use Pressure at MSL instead of surface
Pressure at surface level was the wrong value. All barometers and
altimeters use pressure reduced to mean sea level. Reading that value
from GFS instead returns much more reasonable values.

ref T537
2019-02-22 20:36:20 +00:00
Klaus Basan
2031ba3d8b Ref T528, avoid crash (assert) if simulator object is not accessible (remote UI)
Also disable some UI elements in that case + display an info
2019-02-22 20:36:08 +00:00
Mat Sutcliffe
077fd8c35a Ref T525 Avoid directly calling getLogCategories. 2019-02-22 20:35:52 +00:00
Klaus Basan
341f2db406 Ref T515, allow to emit "physicallyAddingRemoteModelFailed" 2019-02-22 20:35:44 +00:00
Klaus Basan
f5cef58c03 Ref T515, emulated driver UI adjustments 2019-02-22 20:35:43 +00:00
Klaus Basan
6470c61d0a Ref T515, added failover flag for addingRemoteModelFailed
* adjusted signatures
* renamings and minor style adjustments
2019-02-22 20:35:41 +00:00
Roland Rossgotterer
9a7af86a5e Loop over the container itself instead of a temporary value list 2019-02-22 20:35:17 +00:00
Roland Rossgotterer
8df4024bde Regularly update X-Plane simulated aircraft
The simulated aircraft object has been set only once for each X-Plane aircraft as soon as adding to the simulator succeeded. Any updates to transponder codes, modes etc. were missed and never updated.
To make sure we always have the latest information available, we update all known X-Plane aircraft every second in the slow timer tasks.

Manifest Tasks: T502
2019-02-22 20:35:17 +00:00
Roland Rossgotterer
90bc693509 Handle a hypothetical relative humidity of 0.0 %
Summary:
The formular to calculate the dew point is not defined for relative
humidity of 0.0 %. It is every unlikely to ever happen in real world
weather, but is handled just in case by using the smallest possible
numerical double value.

Reviewers: #swift_pilot_client

Maniphest Tasks: T406

Differential Revision: https://dev.swift-project.org/D82
2019-02-22 20:35:16 +00:00
Klaus Basan
b5ffa57fe8 Ref T444, Ref T471 style/comment 2019-02-22 20:35:10 +00:00
Mat Sutcliffe
f4a0df315d Ref T488 Fixed undefined behaviour in g2clib and libxplanemp. 2019-02-22 20:34:58 +00:00
Mat Sutcliffe
7cb581f865 Ref T488 Fixed cppcheck warnings. 2019-02-22 20:34:57 +00:00
Mat Sutcliffe
5a17f43a5b Ref T488 Update cppcheck suppressions. 2019-02-22 20:34:56 +00:00
Mat Sutcliffe
225ff81252 Ref T485 Adjust CLogMessage and CStatusMessage call sites to use the new API. 2019-02-22 20:34:55 +00:00
Roland Rossgotterer
d639187f91 Convert static common simulator plugins to shared ones
Test Plan:
- Check that the new shared libraries are packaged in all platform installers.
- check that plugins are loaded properly on all platforms.

Reviewers: #swift_pilot_client, msutcliffe

Reviewed By: #swift_pilot_client, msutcliffe

Maniphest Tasks: T471

Differential Revision: https://dev.swift-project.org/D79
2019-02-22 20:34:50 +00:00
Mat Sutcliffe
d6b5dca6b2 Return a default-constructed QString instead of implicitly converting an empty string literal. 2019-02-22 20:23:49 +00:00
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
ace7650ebe Ref T480 No need for QStringLiteral when concatenating with %, use UTF-16 string literals. 2019-02-22 20:23:46 +00:00
Mat Sutcliffe
4344ca1a77 Suppressed clazy false positives: method potentially mismarked as slot. 2019-02-22 20:23:39 +00:00
Mat Sutcliffe
462172a87f Fixed clazy warnings: unnecessary containers and containers being detached in range-for loops. 2019-02-22 20:23:37 +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
Mat Sutcliffe
9f85a7b560 Fixed clazy warnings: pass large objects by reference to const. 2019-02-22 20:23:33 +00:00
Mat Sutcliffe
82679a3010 Replace qmake variable BLACK_CONFIG with a system based on json files.
The config is loaded from json files by qmake, and we define the qmake
function `swiftConfig` for checking whether a feature is enabled.
This function can be directly used in `buildconfig_gen.cpp.in`,
so the trick with C++ comment tokens in variables is not needed.
2019-02-22 20:23:25 +00:00
Klaus Basan
59343c6c24 Minor style fixes 2018-12-14 19:57:31 +01: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
39a77d9c16 Ref T443, P3D v4.4 combobox 2018-12-11 11:40:49 +01:00
Roland Rossgotterer
18ed289949 Workaround GCC 5.3 bug about constructor inheritance
See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=6705 for details
2018-12-11 10:54:44 +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
Klaus Basan
ec6b7ed37d Ref T437, some FSUIPC style/message adjustments 2018-12-01 05:17:41 +01:00
Klaus Basan
07eac1d46f Ref T436, used interpolated situation if possible for new FSX/P3D aircraft 2018-11-30 22:02:04 +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
e959075a56 Fix missing include 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
Roland Winklmeier
2843e20d54 Update xswiftbus.conf when updating connection details
ref T434
2018-11-29 20:54:25 +01:00
Klaus Basan
13f6cc1180 Ref T437, Ref D29 fixed Jenkins build warnings
Discussed here: https://swift-project.slack.com/archives/G7GD2UP9C/p1543238741010300
The manual changed applied on the original FSUIPC SDK file were reveretd b adding a newer version
2018-11-29 20:54:25 +01:00
Klaus Basan
9292b63be6 Ref T437, FSUIPC thread assert check 2018-11-22 19:55:04 +01:00
Klaus Basan
d6fad99474 Ref T437, renamed CFsuipc functions to align with FSUIPC code 2018-11-22 19:55:04 +01:00
Klaus Basan
410d77330f Ref T437, extern C and use normal pointer 2018-11-22 19:55:04 +01:00
Klaus Basan
7f7cf2e031 Ref T436, underflow detection for FSX
* utility functions
* force gnd flag to avoid underflow
2018-11-22 19:55:04 +01:00
Klaus Basan
f6e04d4488 Ref T437, skip updates for FSUIPC and SB area for some cycles 2018-11-22 19:55:04 +01:00
Klaus Basan
39e4b2a61d Style
* CLANG
* #ifdef
2018-11-22 19:55:04 +01:00
Klaus Basan
034525316e Ref T437, fixed missing update of "m_simTransponder" which caused SB area changes to be ignored
* also added SELCAL hints
* sync m_simTransponder
2018-11-22 19:55:04 +01:00
Klaus Basan
7bd3d2793e Ref T437, FSX common improvements
* some SB area fixes like SIMCONNECT_CLIENT_DATA_SET_FLAG_DEFAULT
* use either SB area or FSUIPC
* also write XPDR via FSUIPC
2018-11-22 19:55:03 +01:00
Klaus Basan
33116d3b21 Ref T437, adjusted CFsuipc class 2018-11-22 19:55:03 +01:00