Commit Graph

366 Commits

Author SHA1 Message Date
Roland Winklmeier
2e5176ebcc Set timer id to invalid once it got killed
After two consecutive calls to CSimulatorFsx::reset(), the timer was
killed again in the second call. This caused an internal Qt warning,
since the id is unknown after it got killed in the first call.
2016-12-13 19:00:51 +01:00
Mathew Sutcliffe
132ffa9ec2 refs #802 Fixed Clang warning (read beyond the end of a string literal). 2016-12-13 19:00:48 +01:00
Mathew Sutcliffe
5080c47288 refs #802 Fixed Clang warnings. 2016-12-13 19:00:47 +01:00
Klaus Basan
42549760ed refs #789, support for aircraft out of FSX reality bubble
* such aircraft will be tried to be added again
* removed qeueud adding as it was not solving the problem
2016-12-13 18:59:54 +01:00
Klaus Basan
94d6b8d6b8 refs #789, improvements to try to solve FSX issue in driver
* more asserts to find issues
* limit number of exceptions displayed
* reset() function (there was an issue with not cleaned up values)
* using CSimConnectObjects and adjustments for the previous changes
2016-12-06 09:47:07 +01:00
Klaus Basan
9deedf1e10 refs #789, improvements when addressing FSX driver issue
* added new utility funtion is model list / aircraft list
* added setters/getters for CSimConnectObject
* added setters/getters for InterpolationStatus / PartsStatus
* added CSimConnectObjects (better encapsulation)
2016-12-06 09:47:04 +01:00
Klaus Basan
3f6cef1c9f refs #796, allow to toggle full interpolation
* add setup class, metadata registration, property index ...
* removed enableDebugMessages, added setInterpolatorSetup
* adjusted contexts
* used in interolator
2016-12-06 09:47:01 +01:00
Mathew Sutcliffe
e25785d09b Fixed wrong CLogMessage constructor being used
nullptr was being implicitly converted to a null C-style string
via the initializer_list constructor of CLogCategoryList.

refs #790
2016-12-06 09:46:52 +01:00
Mathew Sutcliffe
b5dfd15d66 When dealing with pitch and bank as signed ints, it is desirable to
round down, rather than toward zero, to get a linear distribution.

refs #790
2016-12-06 09:46:51 +01:00
Mathew Sutcliffe
f4d7474941 [FS9] Removed needless constructors 2016-12-06 09:46:50 +01:00
Mathew Sutcliffe
c427052354 [FS9] Using auto to avoid mindless duplication 2016-12-06 09:46:49 +01:00
Roland Winklmeier
6f5193a74f [FS9] Read and update own aircraft model via FSUIPC
FS9 plugin did not detect own aircraft model under all circumstances.
FS9 does not initially send it when connecting - only
during initial selection and if it is changed later. In order
to get the initial model if swift is started while FS9 was already
running, read it regularly from FSUIPC.
2016-12-06 09:46:46 +01:00
Roland Winklmeier
55b19d2f74 [FS9] Move MPChangePlayerPlane sending into its own member function 2016-12-06 09:46:45 +01:00
Roland Winklmeier
a13f7eb1d4 [FS9] Add missing null termination when serializing QStrings
The produced QByteArray was missing the null terminating character,
since QByteArray::append() only added up to and not including '\0'.
This was also the reason why sometimes planes did not change their
aircraft models properly.
2016-12-06 09:46:44 +01:00
Roland Winklmeier
ea561cf723 Warn in case pitch value from simulator is out of limits
refs #790
2016-12-06 09:46:43 +01:00
Roland Winklmeier
eb58450e8c Remove unnecessary limit checking
A signed 10 bit integer has a range of [-512, +511]. After applying
the multiplicator, neither pitch nor bank will every be outside of
those ranges.

refs #790
2016-12-06 09:46:42 +01:00
Roland Winklmeier
7f90652b2f Use bitwise negation operator to invert integer pitch and bank angles
refs #790
2016-12-06 09:46:41 +01:00
Roland Winklmeier
5d7eff0797 Fix incorrect integer signedness in FS9 SDK
refs #790
2016-12-06 09:46:40 +01:00
Klaus Basan
4f447cd408 refs #791, further improve reverse lookup
* utility function if web data are already available
* moved setOwnAircraftModel as reverseLookupAndUpdateOwnAircraftModel to CSimulatorCommon
* reverseLookupAndUpdateOwnAircraftModel also handles async lookup when data are not yet available
* removed context ps_allSwiftWebDataRead reverse lookup, done in CSimulatorCommon now
2016-12-06 09:34:43 +01:00
Klaus Basan
4478af119d refs #791, also perform lookup in simulator plugin`s CSimulatorFsCommon::setOwnAircraftModel 2016-12-06 09:34:41 +01:00
Klaus Basan
df60474510 refs #789, added signal when adding models fails
Signatures in context and simulator
2016-12-06 09:34:25 +01:00
Roland Winklmeier
42737faf2c Fix wrong pitch and bank value interpolation
Pitch and bank angle in CAircraftSituation are according to the
common aeronautical convention:
* Bank in degrees, positive = roll right
* Pitch in degrees, positive = pitch up

Microsoft Flight Simulator is using inverted angles, which was incorrectly
adjusted in the interpolator. This caused wrong values for X-Plane.
This angle correction is now moved into the MSFS specific plugins.
Additionally, so far the pitch and bank angles from own aircraft were
not yet corrected for MSFS. So we did send wrong values to the network.

refs #790
2016-12-06 09:34:24 +01:00
Klaus Basan
313aa9f679 refs #780, formatting simulator common class 2016-12-06 09:34:22 +01:00
Klaus Basan
f8c9782da4 refs #789, FSX errors OPERATION_INVALID and EXCEPTION_UNRECOGNIZED_ID
* only emit aircraft as rendered when object id is received, not before
* added CSimualtedAircraft to CSimConnectObject (so it can be used as signal argument)
* some utility functions to get callsign/simobject by id
2016-12-06 09:34:20 +01:00
Klaus Basan
b87a3dffaa refs #780, during tests adjusted
* doxygen for fsx driver
* moved stats members in base class (so all drivers can update those
2016-12-06 09:34:18 +01:00
Roland Winklmeier
f8fe843687 [FSX] Fix issue that interpolated aircraft parts are not used
refs #780
2016-12-06 09:33:59 +01:00
Klaus Basan
45a620dab5 refs #768, some minor formatting during debugging of mapping wizard
(found that some unnecessary model changed events are sent, will result in some refactoring)
2016-12-06 09:33:27 +01:00
Klaus Basan
bf8198e2c2 refs #768, misc adjustments
* changed signature of ownAircraftModelChanged to model
* added function for a reverse lookup of a model (string->model) and use it when model changed
* renamed function to updateByLocalFileNames
2016-10-17 14:34:15 +01:00
Roland Winklmeier
fb3df51013 Move aircraft matching out of simulator plugins
All model matching will be done simulator independent in
CContextSimulator. The simulator specific part is kept in the model
set.
This also caused the signal modelMatchingCompleted to be renamed to
aircraftRenderingChanged, since the name wasn't accurate anymore.
Both getInstalledModels(), getInstalledModelsCount() and iconForModel()
were removed from the ISimulator interface.

refs #765
2016-09-19 16:30:05 +02:00
Roland Winklmeier
2040ff21c5 Physically remove only physically rendered aircrafts
Physically removing an aircraft which was not yet rendered or known is
undefined behavior.
In this particular case, adding an aircraft the first time caused
its model to be updated, which called slot
ISimulator::changeRemoteAircraftModel, trying to remove an aircraft
which was not yet added and adding it again. This ends up
in an endless loop.
2016-09-19 16:18:50 +02:00
Klaus Basan
aafff6cd82 Formatting this->ui to ui 2016-09-19 16:18:41 +02:00
Roland Winklmeier
4e6c4a076a Delay initial weather injection until simulator is connected
Up to know, the initial weather injection was done in the constructor
of ISimulator implementation. This was to early, since in the best case
the injection was not doing anything and in the worst case, crashed
the application because the plugin wasn't ready yet.
This change also replaces ps_reloadSettings with a specific non-slot
version to avoid code duplication.
2016-08-26 21:05:07 +01:00
Roland Winklmeier
82324d3246 Fix injection of static weather scenarios 2016-08-26 21:04:32 +01:00
Roland Winklmeier
91d2556b16 [FSX] Signal simulator connected once SIMCONNECT_RECV_OPEN is received
refs #549
2016-08-05 11:49:32 +02:00
Mathew Sutcliffe
8ce885eeba refs #697 XBus setting renamed. 2016-08-03 02:19:12 +01:00
Mathew Sutcliffe
7a34cc6d9a refs #697 BlackCore settings renamed and reorganized. 2016-08-03 02:19:11 +01:00
Klaus Basan
86d85c6b60 refs #707, removed originator from some signatures
* not used in remote aircraft provider
* adjusted all using interfaces
2016-07-14 18:49:15 +02:00
Klaus Basan
d782839cb8 refs #703, moved context to subdir
* ns: Context
* adjusted using classes
2016-07-14 18:49:08 +02:00
Roland Winklmeier
10c4fa920d Add weather scenario settings to simulator plugins
refs #663
2016-06-17 10:46:31 +02:00
Mathew Sutcliffe
9666c02adc refs #666, #574 CSimulatorXPlane: fixed default model string to use the new schema. 2016-06-08 23:54:13 +01:00
Mathew Sutcliffe
4c2bc31975 refs #666 XBus expects timestamp relative to current time, in case core and sim PCs run with different clock times. 2016-06-08 23:54:13 +01:00
Mathew Sutcliffe
7ae453b532 refs #666 Moved interpolator to BlackMisc so xbus doesn't need to link BlackCore. 2016-06-08 23:54:13 +01:00
Mathew Sutcliffe
37b4b81b9b refs #666 XBus receives aircraft situations with timestamps. 2016-06-08 23:54:13 +01:00
Mathew Sutcliffe
c64851aeba refs #570 Removed the hardcoded 6 seconds, interpolator honors the offsets of the situations. 2016-06-08 23:54:13 +01:00
Mathew Sutcliffe
0246767e31 Fixed method name. 2016-06-08 23:54:13 +01:00
Roland Winklmeier
4180a890e4 Write settings, logs, cache, etc. into a installation dependent subfolder
refs #668
2016-06-08 21:30:56 +02:00
Mathew Sutcliffe
9bef6854ca Caches: rename "get" to "getThreadLocal" and rename "getCopy" to get. 2016-06-08 18:21:01 +02:00
Klaus Basan
54b1234f7f refs #649, refs #658 fixed includes to new subfolders "db"
some style changes in same step
2016-06-08 18:20:23 +02:00
Roland Winklmeier
602beb0da2 Remove obsolete plugin storage
Plugin storage was used before the value cache existed. With the
value cache this is no longer used and can be removed.

refs #660
2016-05-24 16:45:14 +02:00
Roland Winklmeier
45b0503896 Include Mac OS X platform in installer project
refs #615
2016-05-20 01:40:04 +02:00