From 69982e2856c53788d100e218a5038ca580c8b37f Mon Sep 17 00:00:00 2001 From: Michael Carpenter Date: Tue, 28 May 2013 14:29:04 -0400 Subject: [PATCH 1/2] Fix for bug where displaying WaypointList after adding offline waypoints resulted in an empty waypoint list, until the next waypoint was manually added --- src/ui/WaypointList.cc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/ui/WaypointList.cc b/src/ui/WaypointList.cc index b453f34..d1283ff 100644 --- a/src/ui/WaypointList.cc +++ b/src/ui/WaypointList.cc @@ -122,6 +122,11 @@ WaypointList::WaypointList(QWidget *parent, UASWaypointManager* wpm) : connect(WPM, SIGNAL(waypointViewOnlyListChanged(void)), this, SLOT(waypointViewOnlyListChanged(void))); connect(WPM, SIGNAL(waypointViewOnlyChanged(int,Waypoint*)), this, SLOT(updateWaypointViewOnly(int,Waypoint*))); connect(WPM, SIGNAL(currentWaypointChanged(quint16)), this, SLOT(currentWaypointViewOnlyChanged(quint16))); + + //Even if there are no waypoints, since this is a new instance and there is an + //existing WPM, then we need to assume things have changed, and act appropriatly. + waypointEditableListChanged(); + waypointViewOnlyListChanged(); } // STATUS LABEL From 8344f1690e3dd01e946d5ce355eddc3a6a6f1a7e Mon Sep 17 00:00:00 2001 From: Michael Carpenter Date: Mon, 27 May 2013 11:20:59 -0400 Subject: [PATCH 2/2] Fix for static const float cannot be initialized within a class definition, and other windows compile errors. --- src/uas/UASWaypointManager.cc | 2 +- src/uas/UASWaypointManager.h | 2 +- src/ui/map/QGCMapWidget.cc | 4 ++++ 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/uas/UASWaypointManager.cc b/src/uas/UASWaypointManager.cc index 6b44b3d..d6bdb29 100644 --- a/src/uas/UASWaypointManager.cc +++ b/src/uas/UASWaypointManager.cc @@ -38,7 +38,7 @@ This file is part of the QGROUNDCONTROL project #define PROTOCOL_TIMEOUT_MS 2000 ///< maximum time to wait for pending messages until timeout #define PROTOCOL_DELAY_MS 20 ///< minimum delay between sent messages #define PROTOCOL_MAX_RETRIES 5 ///< maximum number of send retries (after timeout) - +const float UASWaypointManager::defaultAltitudeHomeOffset = 30.0f; UASWaypointManager::UASWaypointManager(UAS* _uas) : uas(_uas), current_retries(0), diff --git a/src/uas/UASWaypointManager.h b/src/uas/UASWaypointManager.h index f0a5566..296f477 100644 --- a/src/uas/UASWaypointManager.h +++ b/src/uas/UASWaypointManager.h @@ -180,7 +180,7 @@ private: quint16 uasid; // XXX export to settings - static const float defaultAltitudeHomeOffset = 30.0f; ///< Altitude offset in meters from home for new waypoints + static const float defaultAltitudeHomeOffset; ///< Altitude offset in meters from home for new waypoints }; #endif // UASWAYPOINTMANAGER_H diff --git a/src/ui/map/QGCMapWidget.cc b/src/ui/map/QGCMapWidget.cc index e9df9cc..d52994a 100644 --- a/src/ui/map/QGCMapWidget.cc +++ b/src/ui/map/QGCMapWidget.cc @@ -212,7 +212,11 @@ void QGCMapWidget::loadSettings(bool changePosition) if (trailType == mapcontrol::UAVTrailType::ByDistance) { // XXX +#ifdef Q_OS_WIN +#pragma message ("WARNING: Settings loading for trail type not implemented") +#else #warning Settings loading for trail type not implemented +#endif } else if (trailType == mapcontrol::UAVTrailType::ByTimeElapsed) {