Commit Graph

89 Commits

Author SHA1 Message Date
Roland Rossgotterer
d29dec81d7 [FS9] Test connection via FSUIPC in listener
Checking whether the FS2004 host is connected is not enough since we rely
on FSUIPC. Do not activate the simulator if FSUIPC is not available (e.g.
not installed).
2020-01-07 19:57:23 +00:00
Roland Rossgotterer
b7c2775ea2 [FS9] Let IDirectPlay8Client::Connect process request asynchronously 2020-01-07 19:57:23 +00:00
Klaus Basan
22d8b52fe8 [FS9] Minor style fixes 2020-01-07 19:57:20 +00:00
Klaus Basan
441ca41ee3 [FS9] Log. messages 2020-01-07 19:46:18 +00:00
Roland Rossgotterer
5efa52cba6 Update aircraft parts in FS9 plugin 2019-10-18 10:36:24 +02:00
Roland Rossgotterer
84248fc1b0 Fix double deletion of CLobbyClient during shutdown 2019-10-18 10:36:24 +02:00
Klaus Basan
b408c8ffed Style 2019-09-16 22:41:38 +01:00
Klaus Basan
f80e093a0a Ref T717, function to send parts/situation for testing and in the model browser 2019-09-16 22:41:37 +01:00
Klaus Basan
25532497d6 Fixed FS9/FSX message handling as reported here: https://discordapp.com/channels/539048679160676382/567139633964646411/612104936574156870 2019-09-16 22:41:22 +01:00
Klaus Basan
26afc5160d Improved logging of "adding aircraft" so we can see details such as the model string 2019-09-16 22:41:17 +01:00
Klaus Basan
718221b90e Ref T683, moved m_skipCockpitUpdateCycles to FS common so it can be used with P3D/FSX and FS9 2019-09-16 22:39:51 +01:00
Klaus Basan
fa6101d02b Ref T683, use slow updates in FS9 for thins not to be updated every cycle 2019-09-16 22:39:51 +01:00
Klaus Basan
0360704b0b Ref T683, "updateOwnSituationAndGroundElevation"
* function to use own positions "on ground" to calculate ground elevation
* use this based on settings
* adjusted simulators code
2019-09-16 22:39:50 +01:00
Klaus Basan
daeea07090 Ref T683, style 2019-09-16 22:39:49 +01:00
Klaus Basan
a86e98ca3a Ref T669, also interpolation Ref T668, remove last sent values if aircraft is removed 2019-09-16 20:29:35 +01:00
Roland Rossgotterer
3e6b7b07f4 [FS9] Shutdown driver if connection to FSUIPC is lost 2019-04-11 22:12:07 +01:00
Roland Rossgotterer
6a5e59b76a [FS9] Implement time synchronisation 2019-04-11 22:11:51 +01:00
Roland Rossgotterer
e0fe7ab1d0 [FS9] Ignore DirectPlay position updates
Those position updates to not contain pressure altitude.
2019-04-11 22:11:51 +01:00
Roland Rossgotterer
b0fd4e03b2 Implement CSimulatorFs9::updateOwnSimulatorCockpit 2019-04-11 22:11:49 +01:00
Klaus Basan
0e916864cb Ref T546, disable provider for FS9 2019-04-11 22:11:31 +01:00
Klaus Basan
bfc7ac97c0 Ref T546, style 2019-04-11 22:11:31 +01:00
Mat Sutcliffe
e9a4c49d68 Ref T547 Update license masthead in all source code files. 2019-02-22 20:36:43 +00:00
Roland Rossgotterer
d6d2c0cc80 [FS9] Stop using Fs9Host and Fs9Client as CContinuousWorkers
Both were continuous workers since a blocking IDirectPlay8Peer::SendTo()
method was used. Since we use the default async method now, we don't need
the threaded implementation any longer. It still could happen that GUI
blocks for too long, but that would happen also for other simulator drivers.

ref T433
2019-02-22 20:36:21 +00:00
Roland Rossgotterer
fa08c6bf15 [FS9] Enable FSUIPC by default for FS9 2019-02-22 20:36:21 +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
Klaus Basan
d6fad99474 Ref T437, renamed CFsuipc functions to align with FSUIPC code 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
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
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
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
359d56b6f6 Weather uses null altitude, https://swift-project.slack.com/archives/G7GD2UP9C/p1534378412000100 2018-08-16 14:44:14 +02:00
Klaus Basan
e21328a5a6 Style 2018-08-16 14:44:11 +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
3d2a74a652 Ref T261, interpolator mode is now part of setup
* added attribute in setup
* adjusted UI
* adjusted interpolator / simulator functions
2018-05-08 16:06:49 +02:00
Klaus Basan
3031e5b648 Ref T261, set client provider in simulator
Needed to obtain client capabilities
2018-05-08 16:06:48 +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
4b7237ce1b Ref T259, Ref T243 adjusted providers to use common base classes 2018-04-06 02:56:57 +02:00
Klaus Basan
897a6f301f Ref T232, aircraft can be re-added or removed via "dot-commands"
* can be used for testing
* utility functions to find inconsistent aircraft states
* reset highlight state
2018-01-30 20:31:59 +01:00
Klaus Basan
3ee5e68054 Ref T238, comments and formatting 2018-01-30 20:31:56 +01:00
Klaus Basan
dac1ee85f9 Ref T232, some (dispatch) timer code was duplicated
* fixed a bug, where a non existing timer was killed
* unified code in base class
2018-01-30 20:30:20 +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
c553d5cdfd Ref T171, FS9 driver: made "private slots" -> "private" 2017-10-18 22:58:25 +02:00
Klaus Basan
b6333e69d8 Ref T171, made remote aircraft provider and web service "protected slots" -> "protected"
* Unlike in other cases, the remote aircraft provider slots are also very frequently called. So besides "style", it might be also useful here to avoid the extra MOC layers.
* Also renamed 2 web service signals and made web service connections Qt::QueuedConnection
2017-10-18 22:58:24 +02:00
Klaus Basan
61a23d700b Ref T171, driver formatting 2017-10-18 22:58:22 +02:00
Roland Winklmeier
27f97e8ac8 Implement interpolator mode for FS9
Summary:
This implementation will always return true if we were setting the mode,
since we cannot easily access the return value from
CInterpolatorMulti::setMode in a thread safe manner.

Reviewers: #swift_pilot_client, kbasan, msutcliffe

Reviewed By: #swift_pilot_client, kbasan, msutcliffe

Subscribers: kbasan, jenkins

Differential Revision: https://dev.swift-project.org/D52
2017-09-24 19:53:35 +01:00
Klaus Basan
66773d7593 Ref T111, allow to set SELCAL in simulator 2017-09-24 19:51:55 +01:00
Klaus Basan
654c35f666 Ref T111, use Q_DECLARE_FLAGS SimulatorStatus instead of int
* changed emitSimulatorCombinedStatu
* changed connected slots/functions
2017-09-24 19:51:10 +01:00
Klaus Basan
29e1d54e05 Ref T111, some fixes in the vicinity of plugin / drivers
* mostly style / doxygen / formatting
* assert/verify
2017-09-24 19:51:02 +01:00