mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-23 07:15:35 +08:00
Ref T298, prepared function to "redo" a mapping
This commit is contained in:
@@ -854,6 +854,23 @@ namespace BlackCore
|
||||
m_weatherManager.requestWeatherGrid(weatherGrid, identifier);
|
||||
}
|
||||
|
||||
bool CContextSimulator::doMappingAgain(const CCallsign &callsign)
|
||||
{
|
||||
if (m_debugEnabled) { CLogMessage(this, CLogCategory::contextSlot()).debug() << Q_FUNC_INFO << callsign.asString(); }
|
||||
if (!this->isAircraftInRange(callsign)) { return false; }
|
||||
if (!this->isSimulatorAvailable()) { return false; }
|
||||
|
||||
QPointer<CContextSimulator> myself(this);
|
||||
QTimer::singleShot(2500, this, [ = ]
|
||||
{
|
||||
if (!myself) { return; }
|
||||
const CSimulatedAircraft aircraft = this->getAircraftInRangeForCallsign(callsign);
|
||||
if (!aircraft.hasCallsign()) { return; } // no longer valid
|
||||
this->xCtxAddedRemoteAircraftReadyForModelMatching(aircraft);
|
||||
});
|
||||
return false;
|
||||
}
|
||||
|
||||
void CContextSimulator::onSimulatorStarted(const CSimulatorPluginInfo &info)
|
||||
{
|
||||
this->stopSimulatorListeners();
|
||||
|
||||
Reference in New Issue
Block a user