mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-01 21:56:43 +08:00
refs #391, allow to send aircraft parts from GUI
* GUI component for aircraft parts * remote aircraft selector component * Adjusted GUI for internals component * Enable / disable debug messages from GUI * Allow to init engines directly * Removed unused async sort in sequence In same step fixed found issues in interpolator * allow to set max rendered aircraft
This commit is contained in:
@@ -242,16 +242,6 @@ namespace BlackSimPlugin
|
||||
return empty;
|
||||
}
|
||||
|
||||
int CSimulatorFsCommon::getMaxRenderedAircraft() const
|
||||
{
|
||||
return this->m_maxRenderedAircraft;
|
||||
}
|
||||
|
||||
void CSimulatorFsCommon::setMaxRenderedAircraft(int maxRenderedAircraft)
|
||||
{
|
||||
this->m_maxRenderedAircraft = maxRenderedAircraft;
|
||||
}
|
||||
|
||||
bool CSimulatorFsCommon::changeRemoteAircraftModel(const CSimulatedAircraft &aircraft, const QString &originator)
|
||||
{
|
||||
if (originator == simulatorOriginator()) { return false; }
|
||||
@@ -275,5 +265,14 @@ namespace BlackSimPlugin
|
||||
return true;
|
||||
}
|
||||
|
||||
void CSimulatorFsCommon::enableDebugMessages(bool driver, bool interpolator)
|
||||
{
|
||||
if (this->m_interpolator)
|
||||
{
|
||||
this->m_interpolator->enableDebugMessages(interpolator);
|
||||
}
|
||||
CSimulatorCommon::enableDebugMessages(driver, interpolator);
|
||||
}
|
||||
|
||||
} // namespace
|
||||
} // namespace
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
#define BLACKSIMPLUGIN_SIMULATOR_COMMON_H
|
||||
|
||||
#include "blackcore/simulator.h"
|
||||
#include "blackcore/interpolator.h"
|
||||
#include "blacksim/fscommon/aircraftmapper.h"
|
||||
#include "fsuipc.h"
|
||||
|
||||
@@ -67,18 +68,15 @@ namespace BlackSimPlugin
|
||||
//! \copydoc IContextSimulator::iconForModel
|
||||
virtual BlackMisc::CPixmap iconForModel(const QString &modelString) const override;
|
||||
|
||||
//! \copydoc ISimulator::getMaxRenderedAircraft
|
||||
virtual int getMaxRenderedAircraft() const override;
|
||||
|
||||
//! \copydoc ISimulator::setMaxRenderedAircraft
|
||||
virtual void setMaxRenderedAircraft(int maxRenderedAircraft) override;
|
||||
|
||||
//! \copydoc ISimulator::changeRenderedAircraftModel
|
||||
virtual bool changeRemoteAircraftModel(const BlackMisc::Simulation::CSimulatedAircraft &aircraft, const QString &originator) override;
|
||||
|
||||
//! \copydoc ISimulator::changeAircraftEnabled
|
||||
virtual bool changeAircraftEnabled(const BlackMisc::Simulation::CSimulatedAircraft &aircraft, const QString &originator) override;
|
||||
|
||||
//! \copydoc ISimulator::enableDebuggingMessages
|
||||
virtual void enableDebugMessages(bool driver, bool interpolator) override;
|
||||
|
||||
protected:
|
||||
//! Constructor
|
||||
CSimulatorFsCommon(
|
||||
@@ -94,6 +92,7 @@ namespace BlackSimPlugin
|
||||
bool m_simTimeSynced = false; //!< Time synchronized?
|
||||
BlackMisc::PhysicalQuantities::CTime m_syncTimeOffset; //!< time offset
|
||||
BlackMisc::Aviation::CAirportList m_airportsInRange; //!< aiports in range of own aircraft
|
||||
BlackCore::IInterpolator *m_interpolator = nullptr; //!< interpolator instance
|
||||
|
||||
// cockpit as set in SIM
|
||||
BlackMisc::Aviation::CComSystem m_simCom1; //!< cockpit COM1 state in simulator
|
||||
|
||||
@@ -660,7 +660,7 @@ namespace BlackSimPlugin
|
||||
if (interpolatorStatus.interpolationSucceeded)
|
||||
{
|
||||
// aircraft parts
|
||||
// inside interpolator if, as no parts can be sent without position
|
||||
// inside "interpolator if", as no parts can be sent without position
|
||||
updateRemoteAircraftParts(simObj, parts, partsStatus, interpolatedSituation, isOnGround); // update and retrieve parts in the same step
|
||||
}
|
||||
|
||||
|
||||
@@ -191,7 +191,6 @@ namespace BlackSimPlugin
|
||||
HANDLE m_hSimConnect = nullptr; //!< Handle to SimConnect object
|
||||
uint m_nextObjID = 1; //!< object ID TODO: also used as request id, where to we place other request ids as for facilities
|
||||
BlackMisc::PhysicalQuantities::CTime m_syncTimeOffset; //!< Time offset (if synchronized)
|
||||
BlackCore::IInterpolator *m_interpolator = nullptr; //!< interpolator instance
|
||||
QHash<BlackMisc::Aviation::CCallsign, CSimConnectObject> m_simConnectObjects;
|
||||
QFutureWatcher<bool> m_watcherConnect;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user