Commit d6288eeb authored by Don Gagne's avatar Don Gagne

Merge pull request #2167 from DonLakeFlyer/Missions

View tweaks
parents e6eb5644 1d567eba
...@@ -84,11 +84,6 @@ Item { ...@@ -84,11 +84,6 @@ Item {
FlightDisplayViewController { id: _controller } FlightDisplayViewController { id: _controller }
MissionController {
id: _missionController
Component.onCompleted: start(false /* editMode */)
}
function reloadContents() { function reloadContents() {
if(_flightVideo) { if(_flightVideo) {
_flightVideo.visible = false _flightVideo.visible = false
......
...@@ -54,6 +54,11 @@ FlightMap { ...@@ -54,6 +54,11 @@ FlightMap {
} }
} }
MissionController {
id: _missionController
Component.onCompleted: start(false /* editMode */)
}
// Home position // Home position
MissionItemIndicator { MissionItemIndicator {
label: "H" label: "H"
......
...@@ -30,6 +30,8 @@ ...@@ -30,6 +30,8 @@
#include "UAS.h" #include "UAS.h"
#include "QGCApplication.h" #include "QGCApplication.h"
QGC_LOGGING_CATEGORY(MultiVehicleManagerLog, "MultiVehicleManagerLog")
MultiVehicleManager::MultiVehicleManager(QGCApplication* app) MultiVehicleManager::MultiVehicleManager(QGCApplication* app)
: QGCTool(app) : QGCTool(app)
, _activeVehicleAvailable(false) , _activeVehicleAvailable(false)
...@@ -97,6 +99,8 @@ bool MultiVehicleManager::notifyHeartbeatInfo(LinkInterface* link, int vehicleId ...@@ -97,6 +99,8 @@ bool MultiVehicleManager::notifyHeartbeatInfo(LinkInterface* link, int vehicleId
/// and all other right things happen when the Vehicle goes away. /// and all other right things happen when the Vehicle goes away.
void MultiVehicleManager::_deleteVehiclePhase1(Vehicle* vehicle) void MultiVehicleManager::_deleteVehiclePhase1(Vehicle* vehicle)
{ {
qCDebug(MultiVehicleManagerLog) << "_deleteVehiclePhase1";
_vehicleBeingDeleted = vehicle; _vehicleBeingDeleted = vehicle;
// Remove from map // Remove from map
...@@ -133,6 +137,8 @@ void MultiVehicleManager::_deleteVehiclePhase1(Vehicle* vehicle) ...@@ -133,6 +137,8 @@ void MultiVehicleManager::_deleteVehiclePhase1(Vehicle* vehicle)
void MultiVehicleManager::_deleteVehiclePhase2 (void) void MultiVehicleManager::_deleteVehiclePhase2 (void)
{ {
qCDebug(MultiVehicleManagerLog) << "_deleteVehiclePhase2";
/// Qml has been notified of vehicle about to go away and should be disconnected from it by now. /// Qml has been notified of vehicle about to go away and should be disconnected from it by now.
/// This means we can now clear the active vehicle property and delete the Vehicle for real. /// This means we can now clear the active vehicle property and delete the Vehicle for real.
...@@ -157,6 +163,8 @@ void MultiVehicleManager::_deleteVehiclePhase2 (void) ...@@ -157,6 +163,8 @@ void MultiVehicleManager::_deleteVehiclePhase2 (void)
void MultiVehicleManager::setActiveVehicle(Vehicle* vehicle) void MultiVehicleManager::setActiveVehicle(Vehicle* vehicle)
{ {
qCDebug(MultiVehicleManagerLog) << "setActiveVehicle" << vehicle;
if (vehicle != _activeVehicle) { if (vehicle != _activeVehicle) {
if (_activeVehicle) { if (_activeVehicle) {
_activeVehicle->setActive(false); _activeVehicle->setActive(false);
...@@ -180,6 +188,8 @@ void MultiVehicleManager::setActiveVehicle(Vehicle* vehicle) ...@@ -180,6 +188,8 @@ void MultiVehicleManager::setActiveVehicle(Vehicle* vehicle)
void MultiVehicleManager::_setActiveVehiclePhase2(void) void MultiVehicleManager::_setActiveVehiclePhase2(void)
{ {
qCDebug(MultiVehicleManagerLog) << "_setActiveVehiclePhase2";
// Now we signal the new active vehicle // Now we signal the new active vehicle
_activeVehicle = _vehicleBeingSetActive; _activeVehicle = _vehicleBeingSetActive;
emit activeVehicleChanged(_activeVehicle); emit activeVehicleChanged(_activeVehicle);
......
...@@ -31,6 +31,7 @@ ...@@ -31,6 +31,7 @@
#include "QGCMAVLink.h" #include "QGCMAVLink.h"
#include "QmlObjectListModel.h" #include "QmlObjectListModel.h"
#include "QGCToolbox.h" #include "QGCToolbox.h"
#include "QGCLoggingCategory.h"
class FirmwarePluginManager; class FirmwarePluginManager;
class AutoPilotPluginManager; class AutoPilotPluginManager;
...@@ -38,6 +39,8 @@ class JoystickManager; ...@@ -38,6 +39,8 @@ class JoystickManager;
class QGCApplication; class QGCApplication;
class MAVLinkProtocol; class MAVLinkProtocol;
Q_DECLARE_LOGGING_CATEGORY(MultiVehicleManagerLog)
class MultiVehicleManager : public QGCTool class MultiVehicleManager : public QGCTool
{ {
Q_OBJECT Q_OBJECT
......
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