Commit Graph

468 Commits

Author SHA1 Message Date
Klaus Basan
c282d4e1f8 Ref T295, network watchdog optimizations
* constructor can pass network accessibility as default
* ping URL now constructed in global setup
* watchdog will prevent unnecessary signals by checking if state has really changed (there are redundant QAM signals for QNetworkAccessManager::networkAccessibleChanged)
* refactorings, thread checks
2018-07-31 01:43:32 +02:00
Roland Winklmeier
b16af78142 Load SimConnect dynamically at runtime.
Previously the FSX/P3D driver tried to link a very specific SimConnect version
from the Windows Assembly cache. This caused issues with machines
which did not have this specific version of SimConnect in the assembly
cache since drivers refused to load without much information. Having a different
version of SimConnect in the assembly cache or even in the bin folder did
not help.
To fix this problem, SimConnect is now loaded and resolved manually at
runtime. This allows to try loading different versions from the assembly
cache or prefer to load the shipped one.
For this, the manifests are linked into the binary's resource section and
activated manually before loading. This has the positive effect, that
loading errors can be handled by code instead of raising a cryptic error and
aborting.
2018-07-12 18:29:45 +02:00
Klaus Basan
21f901590b UNIT test can be skipped on MacOS 2018-07-12 18:29:44 +02:00
Klaus Basan
350d7257c2 Ref T275, unit tests for FSX/P3D
In that very case testing the offsets for request ids
2018-06-27 12:49:12 +02:00
Klaus Basan
978fe5eea2 Ref T275, Ref T280 hint for timestamp based list if they are already sorted 2018-06-18 03:04:29 +02:00
Klaus Basan
6ed541b6ab Ref T243, Ref T273, added info about elevation (where did we obtain it?) 2018-06-13 13:59:52 +02:00
Klaus Basan
c6f3d4e2f2 Ref T270, mark interpolator as unit test
* if we use "recycled" parts, we have to store also the last status
* mark unit test so "recycling" is disabled
* status flag for "reused"
2018-06-13 13:59:46 +02:00
Klaus Basan
b8829cca56 Minor interpolator unit test adjustment 2018-06-13 13:59:34 +02:00
Klaus Basan
38b6e3c997 Unit test to test interpolation setup 2018-06-13 13:59:27 +02:00
Klaus Basan
4eeaf1adc4 Smaller adjustments of unit test and application 2018-06-01 01:30:26 +02:00
Klaus Basan
4f143539f8 Fixed unit tests
* Random number generation was faulty, as we have to use RAND_MAX and not INT_MAX
* fixed CTestAircraftSituation::testSetRotateUpPitch, we need to use a defined front function otherwise it can be randomly outside range
* adjusted performance unit test a bit, as the value vary a lot


Ref T261
2018-05-18 00:25:04 +02:00
Klaus Basan
0f9b275f52 Allow to mark interpolator for unit tests (which can be used to disable some checks) 2018-05-12 21:40:31 +02:00
Klaus Basan
a750c02520 Added unit tests for status message and property index sorting 2018-05-12 21:40:29 +02:00
Klaus Basan
6c50c4ea72 Formatting, minor tweaks 2018-05-12 21:40:23 +02:00
Klaus Basan
ea585ae166 Ref T261, CAircraftSituationChange improvements
* min/max ground distance, also added in situation list
* use model's vtol/CG info
* improved scenery deviation guessing
* adjusted interpolator scenery deviation handling
2018-05-08 16:06:55 +02:00
Klaus Basan
7590be1a54 Ref T261, unit tests for the CG XPlane issue (feet? meters? mixup)
Testing altitude correction
2018-05-08 16:06:53 +02:00
Klaus Basan
0808cdb223 Ref T261, further unify interpolator handling
* return interpolation results parts/situation in one step
* base class init for each interpolation step, less redundant code
* removed old interpolation/parts function
* adjusted unit tests and simulator objects (such as SimObject)
2018-05-08 16:06:52 +02:00
Klaus Basan
a1b2e92684 Ref T261, move default offset times to FSD setup
* make it available in "blackmisc"
* remove dependency from "VATSIM"
2018-05-08 16:06:46 +02:00
Klaus Basan
c7d11975f0 Ref T261, unit tests 2018-05-08 16:06:44 +02:00
Klaus Basan
d021e2dcce Formatting, renaming 2018-05-08 16:06:40 +02:00
Klaus Basan
66bf45eb9c Unit tests, skip if DB is not reachable 2018-05-08 16:06:37 +02:00
Klaus Basan
cd1ce37ec3 Ref T259, Ref T243 interpolator changes
* interpolators use providers for client/situations/parts/ground elevation
* interpolators do no longer use own situations/parts, but those from provider
* interpolators are no longer QObjects (as it is not needed)
* use gnd flag from situation for gnd interpolation, there is no longer a parts gnd flag interpolation
* guess parts during interpolation
* changed iterators to m_s[i] as it makes clearer which values are used
** the flag is transferred from parts -> situation in airspace monitor
** if the other client already provides and gnd.flag in situation this also works
* adjusted logging
* use providers in unit tests / adjusted tests
* improved situation verification/assert
2018-05-08 16:06:33 +02:00
Klaus Basan
aa21d9ea92 Ref T259, Ref T243 unify ground details when a new situation is received 2018-05-04 23:03:32 +02:00
Klaus Basan
1c89f4c8e3 Ref T259, Ref T243 created an implementation for remote aircraft provider
* this implementation is used by airspace monitor
* also used by dummy provider (advantage, unit tests test the real provider)
* some functions adjusted
2018-04-13 23:37:38 +02:00
Klaus Basan
9abc57bb3d Ref T259, Ref T243 remove aircraft parts and situations from interpolator
* no longer using the add parts/situations signals
* will use the remote aircraft provider parts directly

Result: all parts/situations are stored only once in memory and in one single place
2018-04-13 23:37:37 +02:00
Klaus Basan
6a92ea4cb6 Ref T259, Ref T243 situation/parts/lights adjustments
* guessing now in parts/lights (so it can be used with all sims)
* minor renamings
* init FSX data definitions from parts
2018-04-13 23:37:20 +02:00
Klaus Basan
0c06ac26f7 Ref T259, Ref T243 removed interpolation hints
* no longer needed with providers in that form
* pure refactoring commit, just guarantees compilation
* already minor adjustments to use providers
2018-04-13 23:37:18 +02:00
Klaus Basan
333a92ff63 Ref T259, Ref T243 renaming to CInterpolationAndRenderingSetupPerCallsign 2018-04-13 23:36:34 +02:00
Klaus Basan
5843a0d821 Ref T259, Ref T243 unit tests for parts -> situation gnd flag 2018-04-06 02:56:39 +02:00
Klaus Basan
2a0b81de5b Ref T259, Ref T243 client provider used with network classes
Also adds a dummy testing class
2018-04-05 02:54:46 +02:00
Klaus Basan
83b6578e69 Ref T259, Ref T243 use elevation plane for altitude
general idea: by using the plane class, we can set a elevation and then find a better one

* use elevation plane in situation
* adjusted depending classes such as hints, lists
* using setGroundElevationChecked so elevation can be gradually improved
2018-04-05 02:54:28 +02:00
Klaus Basan
c061091bd2 Ref T259, Ref T243 unit test for parts 2018-04-05 02:54:13 +02:00
Klaus Basan
df38107852 Ref T259, Ref T243 improved parts unit test (incremental JSON objects) 2018-04-05 02:54:01 +02:00
Klaus Basan
95f9e435f7 Ref T259, Ref T243 renamed unit test to CTestInterpolatorLinear 2018-04-05 02:53:58 +02:00
Klaus Basan
2fcc47e2d6 Ref T258, unit tests for 7zip compressing 2018-02-22 13:58:48 +01:00
Klaus Basan
a06f59723a Ref T251, unit test for gnd flag sending 2018-02-16 12:13:40 +01:00
Klaus Basan
78e61e25ac Formatting 2018-02-16 12:13:35 +01:00
Klaus Basan
b78d057c59 Ref T243, unit tests 2018-02-09 04:43:43 +01:00
Klaus Basan
86e8ecd2e2 Formatting and typo fixes 2018-02-07 02:41:10 +01:00
Klaus Basan
69e2ed6efe Ref T231, Ref T236, Ref T238 improvements based on Unit test
* check for a correct callsign (assert)
* set callsign if missing (fallback)
* resetLastInterpolation - null last inperpolation
2018-01-30 20:35:09 +01:00
Klaus Basan
c80d12c357 Unit test 2018-01-30 20:31:00 +01:00
Klaus Basan
0991f20f7d Ref T229, adjusted renamings because of CInterpolationStatus changes 2018-01-30 20:29:48 +01:00
Klaus Basan
f049900e1f Ref T223, use const values for standard pressure
* standardISASeaLevelPressure
* use static const values for standard pressure
* minor formatting
2018-01-15 23:00:34 +01:00
Roland Winklmeier
de4fe44156 Fix sending the correct pressure altitude for a pilot position
* Before this commit, only the true altitude was known for an aircraft situation. The pressure altitude was not available anywhere yet.
* This caused a wrong altitude in radar clients.
* We fix this reading the pressure altitude from the simulators and set it in the own aircraft situation.
* MS Flight Simulators have the pressure altitude in the APIs available.
* For X-Plane and emulated simulator, we need to calculate it from the pressure at sea level.
* Finally, we use the new available pressure altitude to send it to the FSD server.

Maniphest Tasks: Ref T223
2018-01-15 22:49:08 +01:00
Klaus Basan
350a75d672 Formatting 2018-01-14 18:47:24 +01:00
Klaus Basan
604c3eb088 Added unit test based on discussion here
https://swift-project.slack.com/archives/G7GD2UP9C/p1515602377000431
2018-01-14 18:47:15 +01:00
Klaus Basan
6c0a74204b Ref T215, unit tests for altitude 2018-01-14 18:45:35 +01:00
Klaus Basan
26b5a6ce28 Found during T215, rectify CIdentifier issues
* null/anonymous identifier
* CIdentifier can be linked with QObject and
* CIdentifier reflects name changes of QObject (UI components change name after ctor call)
2018-01-13 05:04:27 +01:00
Klaus Basan
2c60dfd133 Ref T172, using centralized swift test server
Remark: The credentials for the server were distributed in multiple places, now cnetralized in one
2017-12-29 19:49:30 +01:00
Klaus Basan
8b74acb3a9 Ref T210, moved "guess" into CApplicationInfo
* core unit test, set correct type
* guess application type now in CApplicationInfo
2017-12-21 19:50:09 +01:00