mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-30 20:15:35 +08:00
Ref T111, handle SELCAL in simulator context (fix, was missing so far)
This commit is contained in:
committed by
Mathew Sutcliffe
parent
7cc723c7c3
commit
71fa0fc7b8
@@ -524,6 +524,15 @@ namespace BlackCore
|
||||
m_simulatorPlugin.second->updateOwnSimulatorCockpit(ownAircraft, originator);
|
||||
}
|
||||
|
||||
void CContextSimulator::ps_updateSimulatorSelcalFromContext(const CSelcal &selcal, const CIdentifier &originator)
|
||||
{
|
||||
if (!isSimulatorSimulating()) { return; }
|
||||
if (originator.getName().isEmpty() || originator == IContextSimulator::InterfaceName()) { return; }
|
||||
|
||||
// update
|
||||
m_simulatorPlugin.second->updateOwnSimulatorSelcal(selcal, originator);
|
||||
}
|
||||
|
||||
void CContextSimulator::ps_networkRequestedNewAircraft(const CCallsign &callsign, const QString &aircraftIcao, const QString &airlineIcao, const QString &livery)
|
||||
{
|
||||
if (m_networkSessionId.isEmpty()) { return; }
|
||||
|
||||
@@ -145,6 +145,9 @@ namespace BlackCore
|
||||
//! Update simulator cockpit from context, because someone else has changed cockpit (e.g. GUI, 3rd party)
|
||||
void ps_updateSimulatorCockpitFromContext(const BlackMisc::Simulation::CSimulatedAircraft &ownAircraft, const BlackMisc::CIdentifier &originator);
|
||||
|
||||
//! Update simulator SELCAL from context, because someone else has changed cockpit (e.g. GUI, 3rd party)
|
||||
void ps_updateSimulatorSelcalFromContext(const BlackMisc::Aviation::CSelcal &selcal, const BlackMisc::CIdentifier &originator);
|
||||
|
||||
//! Raw data when a new aircraft was requested, used for statistics
|
||||
void ps_networkRequestedNewAircraft(const BlackMisc::Aviation::CCallsign &callsign, const QString &aircraftIcao, const QString &airlineIcao, const QString &livery);
|
||||
//! @}
|
||||
|
||||
@@ -208,6 +208,9 @@ namespace BlackCore
|
||||
c = connect(this->m_contextOwnAircraft, &IContextOwnAircraft::changedAircraftCockpit,
|
||||
this->getCContextSimulator(), &CContextSimulator::ps_updateSimulatorCockpitFromContext);
|
||||
Q_ASSERT(c);
|
||||
c = connect(this->m_contextOwnAircraft, &IContextOwnAircraft::changedSelcal,
|
||||
this->getCContextSimulator(), &CContextSimulator::ps_updateSimulatorSelcalFromContext);
|
||||
Q_ASSERT(c);
|
||||
c = connect(this->getCContextSimulator(), &CContextSimulator::ownAircraftModelChanged,
|
||||
this->getCContextOwnAircraft(), &CContextOwnAircraft::ps_changedSimulatorModel);
|
||||
Q_ASSERT(c);
|
||||
|
||||
Reference in New Issue
Block a user