mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-23 15:25:35 +08:00
Ref T717, "testRemoteAircraft" simulator context functions
This commit is contained in:
committed by
Mat Sutcliffe
parent
5def05d6b6
commit
903cf07eac
@@ -1002,6 +1002,23 @@ namespace BlackCore
|
||||
return msgs;
|
||||
}
|
||||
|
||||
bool CContextSimulator::testRemoteAircraft(const CSimulatedAircraft &aircraft, bool add)
|
||||
{
|
||||
if (!m_simulatorPlugin.second || !m_simulatorPlugin.second->isConnected()) { return false; }
|
||||
bool added = add;
|
||||
if (add)
|
||||
{
|
||||
m_simulatorPlugin.second->setTestMode(true);
|
||||
added = m_simulatorPlugin.second->logicallyAddRemoteAircraft(aircraft);
|
||||
}
|
||||
else
|
||||
{
|
||||
m_simulatorPlugin.second->logicallyRemoveRemoteAircraft(aircraft.getCallsign());
|
||||
m_simulatorPlugin.second->setTestMode(false); // AFTER we have removed it
|
||||
}
|
||||
return added;
|
||||
}
|
||||
|
||||
bool CContextSimulator::parseCommandLine(const QString &commandLine, const CIdentifier &originator)
|
||||
{
|
||||
Q_UNUSED(originator);
|
||||
|
||||
Reference in New Issue
Block a user