<<"_activeVehicleChanged: Plan View - Previous dirty plan exists, "
}
"no new active vehicle, sending "
"promptForPlanUsageOnVehicleChange signal";
_offline=newOffline;
emitpromptForPlanUsageOnVehicleChange();
emitofflineChanged(offline());
}else{
emitmanagerVehicleChanged(_managerVehicle);
// Plan is not dirty
if(_flyView){
// We are in the Fly View
if(newOffline){
if(newOffline){
// No active vehicle, clear mission
// The active vehicle went away with no new active vehicle
qCDebug(PlanMasterControllerLog)<<"_activeVehicleChanged: Fly View - No active vehicle, clearing stale plan";
qCDebug(PlanMasterControllerLog)
removeAll();
<<"_activeVehicleChanged: Plan View - Previous clean plan "
"exists, no new active vehicle, clear stale plan";
removeAll();
}else{
}else{
// Fly view has changed to a new active vehicle, update to show correct mission
// We are transitioning from one active vehicle to another. Show the
qCDebug(PlanMasterControllerLog)<<"_activeVehicleChanged: Fly View - New active vehicle, loading new plan from manager vehicle";
// plan from the new vehicle.
_showPlanFromManagerVehicle();
qCDebug(PlanMasterControllerLog)
<<"_activeVehicleChanged: Plan View - Previous clean plan "
"exists, new active vehicle, loading from new manager vehicle";
_showPlanFromManagerVehicle();
}
}
}
}else{
}else{
// We are in the Plan view.
// There is no previous Plan in the view
if(containsItems()){
if(newOffline){
// The plan view has a stale plan in it
// Nothing special to do in this case
if(dirty()){
qCDebug(PlanMasterControllerLog)
// Plan is dirty, the user must decide what to do in all cases
<<"_activeVehicleChanged: Plan View - No previous plan, no longer "
qCDebug(PlanMasterControllerLog)<<"_activeVehicleChanged: Plan View - Previous dirty plan exists, no new active vehicle, sending promptForPlanUsageOnVehicleChange signal";
"connected to vehicle, nothing to do";
emitpromptForPlanUsageOnVehicleChange();
}else{
}else{
// Just show the plan from the new vehicle
// Plan is not dirty
qCDebug(PlanMasterControllerLog)
if(newOffline){
<<"_activeVehicleChanged: Plan View - No previous plan, new "
// The active vehicle went away with no new active vehicle
"active vehicle, loading from new manager vehicle";
qCDebug(PlanMasterControllerLog)<<"_activeVehicleChanged: Plan View - Previous clean plan exists, no new active vehicle, clear stale plan";
_showPlanFromManagerVehicle();
removeAll();
}
}else{
}
// We are transitioning from one active vehicle to another. Show the plan from the new vehicle.
}
qCDebug(PlanMasterControllerLog)<<"_activeVehicleChanged: Plan View - Previous clean plan exists, new active vehicle, loading from new manager vehicle";
_showPlanFromManagerVehicle();
// Vehicle changed so we need to signal everything
}
emitcontainsItemsChanged(containsItems());
}
emitsyncInProgressChanged();
}else{
emitdirtyChanged(dirty());
// There is no previous Plan in the view
if(newOffline){
_updatePlanCreatorsList();
// Nothing special to do in this case
}
qCDebug(PlanMasterControllerLog)<<"_activeVehicleChanged: Plan View - No previous plan, no longer connected to vehicle, nothing to do";
}else{
voidPlanMasterController::loadFromVehicle(void){
// Just show the plan from the new vehicle
if(_managerVehicle->vehicleLinkManager()
qCDebug(PlanMasterControllerLog)<<"_activeVehicleChanged: Plan View - No previous plan, new active vehicle, loading from new manager vehicle";
->primaryLink()
_showPlanFromManagerVehicle();
->linkConfiguration()
}
->isHighLatency()){
}
qgcApp()->showAppMessage(
}
tr("Download not supported on high latency links."));
return;
// Vehicle changed so we need to signal everything
}
emitcontainsItemsChanged(containsItems());
emitsyncInProgressChanged();
if(offline()){
emitdirtyChanged(dirty());
qCWarning(PlanMasterControllerLog)
<<"PlanMasterController::loadFromVehicle called while offline";
_updatePlanCreatorsList();
}elseif(_flyView){
}
qCWarning(PlanMasterControllerLog)
<<"PlanMasterController::loadFromVehicle called from Fly view";