Unverified Commit 71ec9db4 authored by Gus Grubba's avatar Gus Grubba Committed by GitHub

Merge pull request #7610 from jzaturensky/fix-airmap

Fix AirMap
parents 76619fd9 d119f681
......@@ -82,7 +82,8 @@ void PlanMasterController::start(bool flyView)
#if defined(QGC_AIRMAP_ENABLED)
//-- This assumes there is one single instance of PlanMasterController in edit mode.
if(!flyView) {
qgcApp()->toolbox()->airspaceManager()->flightPlan()->startFlightPlanning(this);
// Wait for signal confirming AirMap client connection before starting flight planning
connect(qgcApp()->toolbox()->airspaceManager(), &AirspaceManager::connectStatusChanged, this, &PlanMasterController::_startFlightPlanning);
}
#endif
}
......@@ -271,6 +272,15 @@ void PlanMasterController::_sendRallyPointsComplete(void)
}
}
#if defined(QGC_AIRMAP_ENABLED)
void PlanMasterController::_startFlightPlanning(void) {
if (qgcApp()->toolbox()->airspaceManager()->connected()) {
qCDebug(PlanMasterControllerLog) << "PlanMasterController::_startFlightPlanning client connected, start flight planning";
qgcApp()->toolbox()->airspaceManager()->flightPlan()->startFlightPlanning(this);
}
}
#endif
void PlanMasterController::sendToVehicle(void)
{
if (_managerVehicle->highLatencyLink()) {
......
......@@ -111,6 +111,9 @@ private slots:
void _sendMissionComplete(void);
void _sendGeoFenceComplete(void);
void _sendRallyPointsComplete(void);
#if defined(QGC_AIRMAP_ENABLED)
void _startFlightPlanning(void);
#endif
private:
void _showPlanFromManagerVehicle(void);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment