From 67f394bc7630b30983261a50d7110c77a1c375de Mon Sep 17 00:00:00 2001 From: DoinLakeFlyer Date: Tue, 25 Feb 2020 10:38:28 -0800 Subject: [PATCH 01/16] Update changelog for Stable --- ChangeLog.md | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/ChangeLog.md b/ChangeLog.md index 74b9b84..ef73da0 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -4,7 +4,7 @@ Note: This file only contains high level features or important fixes. ## 4.0 -### 4.0.0 - Daily Build +### 4.0.0 - Stable * Added ROI option during manual flight. * Windows: Move builds to 64 bit, Qt 5.12.5 @@ -15,9 +15,7 @@ Note: This file only contains high level features or important fixes. * Plan View: New create plan UI for initial plan creation * New Corridor editing tools ui. Includes ability to trace polyline by clicking. * New Polygon editing tools ui. Includes ability to trace polygon by clicking. -* ArduCopter/Rover: Follow Me setup page * More performant flight path display algorithm. Mobile builds no longer show limited path length. -* ArduCopter/Rover: Add support for Follow Me * ArduPilot: Add Motor Test vehicle setup page * Compass Instrument: Add indicators for Home, COG and Next Waypoint headings. * Log Replay: Support changing speed of playback @@ -52,9 +50,9 @@ Note: This file only contains high level features or important fixes. * ArduPilot: Support configurable mavlink stream rates. Available from Settings/Mavlink page. * Major rewrite and bug fix pass through Structure Scan. Previous version had such bad problems that it can no longer be supported. Plans with Structure Scan will need to be recreated. New QGC will not load old Structure Scan plans. -### 3.5.6 - Not yet released +## 3.5 -### 3.5.5 - Stable +### 3.5.5 * Fix mavlink message memset which cause wrong commands to be sent on ArduPilot GotoLocation. * Disable Pause when fixed wing is on landing approach. From 288e2ae3244c2d30445e9fb2de23c9c3a249da4a Mon Sep 17 00:00:00 2001 From: DoinLakeFlyer Date: Tue, 25 Feb 2020 10:46:49 -0800 Subject: [PATCH 02/16] Remove ArduPilot Follow Me support from Stable --- src/AutoPilotPlugins/APM/APMAutoPilotPlugin.cc | 7 +++++++ src/AutoPilotPlugins/APM/APMAutoPilotPlugin.h | 3 +++ src/FirmwarePlugin/APM/ArduCopterFirmwarePlugin.cc | 3 +++ src/FirmwarePlugin/APM/ArduCopterFirmwarePlugin.h | 3 +++ src/FirmwarePlugin/APM/ArduRoverFirmwarePlugin.cc | 3 +++ src/FirmwarePlugin/APM/ArduRoverFirmwarePlugin.h | 3 +++ 6 files changed, 22 insertions(+) diff --git a/src/AutoPilotPlugins/APM/APMAutoPilotPlugin.cc b/src/AutoPilotPlugins/APM/APMAutoPilotPlugin.cc index 5953407..5209e10 100644 --- a/src/AutoPilotPlugins/APM/APMAutoPilotPlugin.cc +++ b/src/AutoPilotPlugins/APM/APMAutoPilotPlugin.cc @@ -53,7 +53,10 @@ APMAutoPilotPlugin::APMAutoPilotPlugin(Vehicle* vehicle, QObject* parent) , _tuningComponent (nullptr) , _esp8266Component (nullptr) , _heliComponent (nullptr) +#if 0 + // Follow me not ready for Stable , _followComponent (nullptr) +#endif { #if !defined(NO_SERIAL_LINK) && !defined(__android__) connect(vehicle->parameterManager(), &ParameterManager::parametersReadyChanged, this, &APMAutoPilotPlugin::_checkForBadCubeBlack); @@ -104,12 +107,16 @@ const QVariantList& APMAutoPilotPlugin::vehicleComponents(void) _safetyComponent->setupTriggerSignals(); _components.append(QVariant::fromValue((VehicleComponent*)_safetyComponent)); +#if 0 + // Follow me not ready for Stable + if ((qobject_cast(_vehicle->firmwarePlugin()) || qobject_cast(_vehicle->firmwarePlugin())) && _vehicle->parameterManager()->parameterExists(-1, QStringLiteral("FOLL_ENABLE"))) { _followComponent = new APMFollowComponent(_vehicle, this); _followComponent->setupTriggerSignals(); _components.append(QVariant::fromValue((VehicleComponent*)_followComponent)); } +#endif if (_vehicle->vehicleType() == MAV_TYPE_HELICOPTER && (_vehicle->versionCompare(4, 0, 0) >= 0)) { _heliComponent = new APMHeliComponent(_vehicle, this); diff --git a/src/AutoPilotPlugins/APM/APMAutoPilotPlugin.h b/src/AutoPilotPlugins/APM/APMAutoPilotPlugin.h index 28f2166..410fb8b 100644 --- a/src/AutoPilotPlugins/APM/APMAutoPilotPlugin.h +++ b/src/AutoPilotPlugins/APM/APMAutoPilotPlugin.h @@ -57,7 +57,10 @@ protected: APMTuningComponent* _tuningComponent; ESP8266Component* _esp8266Component; APMHeliComponent* _heliComponent; +#if 0 + // Follow me not ready for Stable APMFollowComponent* _followComponent; +#endif #if !defined(NO_SERIAL_LINK) && !defined(__android__) private slots: diff --git a/src/FirmwarePlugin/APM/ArduCopterFirmwarePlugin.cc b/src/FirmwarePlugin/APM/ArduCopterFirmwarePlugin.cc index 6038b81..21cb154 100644 --- a/src/FirmwarePlugin/APM/ArduCopterFirmwarePlugin.cc +++ b/src/FirmwarePlugin/APM/ArduCopterFirmwarePlugin.cc @@ -141,7 +141,10 @@ bool ArduCopterFirmwarePlugin::vehicleYawsToNextWaypointInMission(const Vehicle* return true; } +#if 0 + // Follow me not ready for Stable void ArduCopterFirmwarePlugin::sendGCSMotionReport(Vehicle* vehicle, FollowMe::GCSMotionReport& motionReport, uint8_t estimatationCapabilities) { _sendGCSMotionReport(vehicle, motionReport, estimatationCapabilities); } +#endif diff --git a/src/FirmwarePlugin/APM/ArduCopterFirmwarePlugin.h b/src/FirmwarePlugin/APM/ArduCopterFirmwarePlugin.h index 9b802a8..bd87214 100644 --- a/src/FirmwarePlugin/APM/ArduCopterFirmwarePlugin.h +++ b/src/FirmwarePlugin/APM/ArduCopterFirmwarePlugin.h @@ -71,7 +71,10 @@ public: bool vehicleYawsToNextWaypointInMission (const Vehicle* vehicle) const override; QString autoDisarmParameter (Vehicle* vehicle) override { Q_UNUSED(vehicle); return QStringLiteral("DISARM_DELAY"); } bool supportsSmartRTL (void) const override { return true; } +#if 0 + // Follow me not ready for Stable void sendGCSMotionReport (Vehicle* vehicle, FollowMe::GCSMotionReport& motionReport, uint8_t estimatationCapabilities) override; +#endif private: static bool _remapParamNameIntialized; diff --git a/src/FirmwarePlugin/APM/ArduRoverFirmwarePlugin.cc b/src/FirmwarePlugin/APM/ArduRoverFirmwarePlugin.cc index 46a0fe0..c5e9376 100644 --- a/src/FirmwarePlugin/APM/ArduRoverFirmwarePlugin.cc +++ b/src/FirmwarePlugin/APM/ArduRoverFirmwarePlugin.cc @@ -78,7 +78,10 @@ bool ArduRoverFirmwarePlugin::supportsNegativeThrust(Vehicle* /*vehicle*/) return true; } +#if 0 + // Follow me not ready for Stable void ArduRoverFirmwarePlugin::sendGCSMotionReport(Vehicle* vehicle, FollowMe::GCSMotionReport& motionReport, uint8_t estimatationCapabilities) { _sendGCSMotionReport(vehicle, motionReport, estimatationCapabilities); } +#endif diff --git a/src/FirmwarePlugin/APM/ArduRoverFirmwarePlugin.h b/src/FirmwarePlugin/APM/ArduRoverFirmwarePlugin.h index ca29f89..01666b6 100644 --- a/src/FirmwarePlugin/APM/ArduRoverFirmwarePlugin.h +++ b/src/FirmwarePlugin/APM/ArduRoverFirmwarePlugin.h @@ -53,7 +53,10 @@ public: bool supportsNegativeThrust (Vehicle *) final; bool supportsSmartRTL (void) const override { return true; } QString offlineEditingParamFile (Vehicle* vehicle) override { Q_UNUSED(vehicle); return QStringLiteral(":/FirmwarePlugin/APM/Rover.OfflineEditing.params"); } +#if 0 + // Follow me not ready for Stable void sendGCSMotionReport (Vehicle* vehicle, FollowMe::GCSMotionReport& motionReport, uint8_t estimatationCapabilities) override; +#endif private: static bool _remapParamNameIntialized; From 13000a24b97c87f8180403babd3b0c1167a65d4f Mon Sep 17 00:00:00 2001 From: DoinLakeFlyer Date: Tue, 25 Feb 2020 13:59:56 -0800 Subject: [PATCH 03/16] Remove some more Follow stuff --- src/FirmwarePlugin/APM/ArduCopterFirmwarePlugin.cc | 6 ++++++ src/FirmwarePlugin/APM/ArduCopterFirmwarePlugin.h | 3 +++ src/FirmwarePlugin/APM/ArduRoverFirmwarePlugin.cc | 6 ++++++ src/FirmwarePlugin/APM/ArduRoverFirmwarePlugin.h | 3 +++ 4 files changed, 18 insertions(+) diff --git a/src/FirmwarePlugin/APM/ArduCopterFirmwarePlugin.cc b/src/FirmwarePlugin/APM/ArduCopterFirmwarePlugin.cc index 21cb154..3af285e 100644 --- a/src/FirmwarePlugin/APM/ArduCopterFirmwarePlugin.cc +++ b/src/FirmwarePlugin/APM/ArduCopterFirmwarePlugin.cc @@ -43,7 +43,10 @@ APMCopterMode::APMCopterMode(uint32_t mode, bool settable) : { GUIDED_NOGPS, "Guided No GPS"}, { SMART_RTL, "Smart RTL"}, { FLOWHOLD, "Flow Hold" }, +#if 0 + // Follow me not ready for Stable { FOLLOW, "Follow" }, +#endif { ZIGZAG, "ZigZag" }, }); } @@ -71,7 +74,10 @@ ArduCopterFirmwarePlugin::ArduCopterFirmwarePlugin(void) APMCopterMode(APMCopterMode::GUIDED_NOGPS, true), APMCopterMode(APMCopterMode::SMART_RTL, true), APMCopterMode(APMCopterMode::FLOWHOLD, true), +#if 0 + // Follow me not ready for Stable APMCopterMode(APMCopterMode::FOLLOW, true), +#endif APMCopterMode(APMCopterMode::ZIGZAG, true), }); diff --git a/src/FirmwarePlugin/APM/ArduCopterFirmwarePlugin.h b/src/FirmwarePlugin/APM/ArduCopterFirmwarePlugin.h index bd87214..05c5969 100644 --- a/src/FirmwarePlugin/APM/ArduCopterFirmwarePlugin.h +++ b/src/FirmwarePlugin/APM/ArduCopterFirmwarePlugin.h @@ -43,7 +43,10 @@ public: GUIDED_NOGPS= 20, SMART_RTL = 21, // SMART_RTL returns to home by retracing its steps FLOWHOLD = 22, // FLOWHOLD holds position with optical flow without rangefinder +#if 0 + // Follow me not ready for Stable FOLLOW = 23, // follow attempts to follow another vehicle or ground station +#endif ZIGZAG = 24, // ZIGZAG mode is able to fly in a zigzag manner with predefined point A and point B }; diff --git a/src/FirmwarePlugin/APM/ArduRoverFirmwarePlugin.cc b/src/FirmwarePlugin/APM/ArduRoverFirmwarePlugin.cc index c5e9376..0dbef83 100644 --- a/src/FirmwarePlugin/APM/ArduRoverFirmwarePlugin.cc +++ b/src/FirmwarePlugin/APM/ArduRoverFirmwarePlugin.cc @@ -22,7 +22,10 @@ APMRoverMode::APMRoverMode(uint32_t mode, bool settable) {STEERING, "Steering"}, {HOLD, "Hold"}, {LOITER, "Loiter"}, +#if 0 + // Follow me not ready for Stable {FOLLOW, "Follow"}, +#endif {SIMPLE, "Simple"}, {AUTO, "Auto"}, {RTL, "RTL"}, @@ -40,7 +43,10 @@ ArduRoverFirmwarePlugin::ArduRoverFirmwarePlugin(void) APMRoverMode(APMRoverMode::STEERING ,true), APMRoverMode(APMRoverMode::HOLD ,true), APMRoverMode(APMRoverMode::LOITER ,true), +#if 0 + // Follow me not ready for Stable APMRoverMode(APMRoverMode::FOLLOW ,true), +#endif APMRoverMode(APMRoverMode::SIMPLE ,true), APMRoverMode(APMRoverMode::AUTO ,true), APMRoverMode(APMRoverMode::RTL ,true), diff --git a/src/FirmwarePlugin/APM/ArduRoverFirmwarePlugin.h b/src/FirmwarePlugin/APM/ArduRoverFirmwarePlugin.h index 01666b6..1338b3f 100644 --- a/src/FirmwarePlugin/APM/ArduRoverFirmwarePlugin.h +++ b/src/FirmwarePlugin/APM/ArduRoverFirmwarePlugin.h @@ -25,7 +25,10 @@ public: STEERING = 3, HOLD = 4, LOITER = 5, +#if 0 + // Follow me not ready for Stable FOLLOW = 6, +#endif SIMPLE = 7, AUTO = 10, RTL = 11, From 578c557325975a3f735a4467375b7db0e027fdfc Mon Sep 17 00:00:00 2001 From: Don Gagne Date: Tue, 25 Feb 2020 14:16:53 -0800 Subject: [PATCH 04/16] Travis failing due to verbose macdeployqt output --- QGCInstaller.pri | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/QGCInstaller.pri b/QGCInstaller.pri index 5f25b20..80bbd1d 100644 --- a/QGCInstaller.pri +++ b/QGCInstaller.pri @@ -27,7 +27,7 @@ installer { # We cd to release directory so we can run macdeployqt without a path to the # qgroundcontrol.app file. If you specify a path to the .app file the symbolic # links to plugins will not be created correctly. - QMAKE_POST_LINK += && cd $${DESTDIR} && $$dirname(QMAKE_QMAKE)/macdeployqt $${TARGET}.app -appstore-compliant -verbose=2 -qmldir=$${BASEDIR}/src + QMAKE_POST_LINK += && cd $${DESTDIR} && $$dirname(QMAKE_QMAKE)/macdeployqt $${TARGET}.app -appstore-compliant -verbose=1 -qmldir=$${BASEDIR}/src # macdeployqt is missing some relocations once in a while. "Fix" it: QMAKE_POST_LINK += && python $$BASEDIR/tools/osxrelocator.py $${TARGET}.app/Contents @rpath @executable_path/../Frameworks -r > /dev/null 2>&1 From 2194dc2c87b7f5a29898ddf483700134b27966ea Mon Sep 17 00:00:00 2001 From: Don Gagne Date: Wed, 26 Feb 2020 09:25:01 -0800 Subject: [PATCH 05/16] Use v2 provider for GitHub upload to work around travis bug --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index edc1f19..b39d2ac 100644 --- a/.travis.yml +++ b/.travis.yml @@ -270,6 +270,7 @@ deploy: # deploy installers to Github releases if on a tag - provider: releases + edge: true # Use V2 provider to work around V1 bug api-key: secure: K/Zqr/FCC7QvzFxYvBtCinPkacQq2ubJ2qm982+38Zf/KjibVOF1dEbVdrGZmII6Tg5DaQzNXGYkg5PvYmJgT9xRsqeQjeYIUYqYZpAt+HYWA38AVfMU8jip/1P1wmwqD469nzJOBBa8yfsMs6Ca7tBaNl/zTxCRGnAgEzqtkdQ= file_glob: true From 65a28f6e183fb8f52cb22907b9f5f6af537a7abf Mon Sep 17 00:00:00 2001 From: DoinLakeFlyer Date: Wed, 26 Feb 2020 09:50:01 -0800 Subject: [PATCH 06/16] Skip invalid coords --- src/FlightMap/Widgets/MapFitFunctions.qml | 23 ++++++++--------------- 1 file changed, 8 insertions(+), 15 deletions(-) diff --git a/src/FlightMap/Widgets/MapFitFunctions.qml b/src/FlightMap/Widgets/MapFitFunctions.qml index dc3c3d8..b819799 100644 --- a/src/FlightMap/Widgets/MapFitFunctions.qml +++ b/src/FlightMap/Widgets/MapFitFunctions.qml @@ -62,8 +62,14 @@ Item { var east = normalizeLon(coordList[0].longitude) var west = east for (var i = 1; i < coordList.length; i++) { - var lat = normalizeLat(coordList[i].latitude) - var lon = normalizeLon(coordList[i].longitude) + var lat = coordList[i].latitude + var lon = coordList[i].longitude + if (isNaN(lat) || lat == 0 || isNan(lon) || lon == 0) { + // Be careful of invalid coords which can happen when items are not yet complete + continue + } + lat = normalizeLat(lat) + lon = normalizeLon(lat) north = Math.max(north, lat) south = Math.min(south, lat) east = Math.max(east, lon) @@ -110,19 +116,6 @@ Item { // Being called prior to controller.start return } - /* - for (var i=1; i<_missionController.visualItems.count; i++) { - var missionItem = _missionController.visualItems.get(i) - if (missionItem.specifiesCoordinate && !missionItem.isStandaloneCoordinate) { - console.log(missionItem.boundingCube.pointNW) - console.log(missionItem.boundingCube.pointSE) - var loc = QtPositioning.rectangle(missionItem.boundingCube.pointNW, missionItem.boundingCube.pointSE) - console.log(loc) - map.visibleRegion = loc - return - } - } - */ var coordList = [ ] addMissionItemCoordsForFit(coordList) fitMapViewportToAllCoordinates(coordList) From 0c2f65fcedb01bc18226fbaff444a8a34317d7c0 Mon Sep 17 00:00:00 2001 From: Andrew Voznytsa Date: Tue, 25 Feb 2020 22:50:43 +0200 Subject: [PATCH 07/16] Don't unref _tee - we don't hold reference to this object, it is owned by _pipeline --- src/VideoStreaming/VideoReceiver.cc | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/VideoStreaming/VideoReceiver.cc b/src/VideoStreaming/VideoReceiver.cc index 1d54618..36b3ef9 100644 --- a/src/VideoStreaming/VideoReceiver.cc +++ b/src/VideoStreaming/VideoReceiver.cc @@ -659,8 +659,6 @@ VideoReceiver::_shutdownPipeline() { } gst_element_set_state(_pipeline, GST_STATE_NULL); gst_bin_remove(GST_BIN(_pipeline), _videoSink); - gst_bin_remove(GST_BIN(_pipeline), _tee); - gst_object_unref(_tee); _tee = nullptr; gst_object_unref(_pipeline); _pipeline = nullptr; From 1284ef09e93972920cb468e92d8671e5ac19dee5 Mon Sep 17 00:00:00 2001 From: Don Gagne Date: Wed, 26 Feb 2020 11:22:15 -0800 Subject: [PATCH 08/16] Still trying to get travis to not puke --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index b39d2ac..a37812a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -223,6 +223,7 @@ before_deploy: fi deploy: + edge: true # Use V2 provider to work around V1 bug # deploy installers to s3 builds/ if on a branch - provider: s3 access_key_id: AKIAIVORNALE7NHD3T6Q @@ -270,7 +271,6 @@ deploy: # deploy installers to Github releases if on a tag - provider: releases - edge: true # Use V2 provider to work around V1 bug api-key: secure: K/Zqr/FCC7QvzFxYvBtCinPkacQq2ubJ2qm982+38Zf/KjibVOF1dEbVdrGZmII6Tg5DaQzNXGYkg5PvYmJgT9xRsqeQjeYIUYqYZpAt+HYWA38AVfMU8jip/1P1wmwqD469nzJOBBa8yfsMs6Ca7tBaNl/zTxCRGnAgEzqtkdQ= file_glob: true From 77463bffad5629dc6267349d96018255b802d04d Mon Sep 17 00:00:00 2001 From: Don Gagne Date: Wed, 26 Feb 2020 11:24:38 -0800 Subject: [PATCH 09/16] Try again --- .travis.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index a37812a..c4b61d6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -223,9 +223,9 @@ before_deploy: fi deploy: - edge: true # Use V2 provider to work around V1 bug # deploy installers to s3 builds/ if on a branch - provider: s3 + edge: true # Use V2 provider to work around V1 bug access_key_id: AKIAIVORNALE7NHD3T6Q secret_access_key: secure: BsLXeXUPsCJdX4tawrDnO8OFK5Hk4kzlDTiyH93En6TbjUargVAWDMcHVj7TUhr7+3Tao1W1zb0G4SJe9kHv+jrky0yE72KvoG3YAON0VXWKizxBAKkgHE2RxSTNAwDeKbi2G6YJfNDescBBfX7zEohShdXglQu7CGaUQKRaiI4= @@ -256,6 +256,7 @@ deploy: # deploy tagged installers to s3 version folder - provider: s3 + edge: true # Use V2 provider to work around V1 bug access_key_id: AKIAIVORNALE7NHD3T6Q secret_access_key: secure: BsLXeXUPsCJdX4tawrDnO8OFK5Hk4kzlDTiyH93En6TbjUargVAWDMcHVj7TUhr7+3Tao1W1zb0G4SJe9kHv+jrky0yE72KvoG3YAON0VXWKizxBAKkgHE2RxSTNAwDeKbi2G6YJfNDescBBfX7zEohShdXglQu7CGaUQKRaiI4= @@ -271,6 +272,7 @@ deploy: # deploy installers to Github releases if on a tag - provider: releases + edge: true # Use V2 provider to work around V1 bug api-key: secure: K/Zqr/FCC7QvzFxYvBtCinPkacQq2ubJ2qm982+38Zf/KjibVOF1dEbVdrGZmII6Tg5DaQzNXGYkg5PvYmJgT9xRsqeQjeYIUYqYZpAt+HYWA38AVfMU8jip/1P1wmwqD469nzJOBBa8yfsMs6Ca7tBaNl/zTxCRGnAgEzqtkdQ= file_glob: true From 723248be2ac4e635ff307ddfe3c3407ae37e198a Mon Sep 17 00:00:00 2001 From: DoinLakeFlyer Date: Thu, 27 Feb 2020 09:11:24 -0800 Subject: [PATCH 10/16] Fix auto-display of Plan/File --- src/QmlControls/ToolStrip.qml | 1 + 1 file changed, 1 insertion(+) diff --git a/src/QmlControls/ToolStrip.qml b/src/QmlControls/ToolStrip.qml index 87374c5..067928f 100644 --- a/src/QmlControls/ToolStrip.qml +++ b/src/QmlControls/ToolStrip.qml @@ -29,6 +29,7 @@ Rectangle { property AbstractButton lastClickedButton: null function simulateClick(buttonIndex) { + buttonIndex = buttonIndex + 1 // skip over title toolStripColumn.children[buttonIndex].checked = true toolStripColumn.children[buttonIndex].clicked() } From e2af8dbe667e1a1342bf92d3592159279e090d58 Mon Sep 17 00:00:00 2001 From: Don Gagne Date: Thu, 27 Feb 2020 10:51:29 -0800 Subject: [PATCH 11/16] Better logging for ArduPIlot manifest lookup --- src/VehicleSetup/FirmwareUpgradeController.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/VehicleSetup/FirmwareUpgradeController.cc b/src/VehicleSetup/FirmwareUpgradeController.cc index 788a81b..c6a801b 100644 --- a/src/VehicleSetup/FirmwareUpgradeController.cc +++ b/src/VehicleSetup/FirmwareUpgradeController.cc @@ -724,7 +724,7 @@ void FirmwareUpgradeController::setSelectedFirmwareBuildType(FirmwareBuildType_t void FirmwareUpgradeController::_buildAPMFirmwareNames(void) { #if !defined(NO_ARDUPILOT_DIALECT) - qCDebug(FirmwareUpgradeLog) << "_buildAPMFirmwareNames"; + qCDebug(FirmwareUpgradeLog) << "_buildAPMFirmwareNames" << _foundBoardInfo.description() << _foundBoardInfo.vendorIdentifier() << _foundBoardInfo.productIdentifier(); bool chibios = _apmChibiOSSetting->rawValue().toInt() == 0; FirmwareVehicleType_t vehicleType = static_cast(_apmVehicleTypeSetting->rawValue().toInt()); From 7a50132973f24d9858fbbc4a60a9f872b9de7ae0 Mon Sep 17 00:00:00 2001 From: Don Gagne Date: Thu, 27 Feb 2020 13:21:34 -0800 Subject: [PATCH 12/16] Even better manifest logging --- src/VehicleSetup/FirmwareUpgradeController.cc | 27 +++++++++++++++++++-------- 1 file changed, 19 insertions(+), 8 deletions(-) diff --git a/src/VehicleSetup/FirmwareUpgradeController.cc b/src/VehicleSetup/FirmwareUpgradeController.cc index c6a801b..ae5ec5d 100644 --- a/src/VehicleSetup/FirmwareUpgradeController.cc +++ b/src/VehicleSetup/FirmwareUpgradeController.cc @@ -724,28 +724,39 @@ void FirmwareUpgradeController::setSelectedFirmwareBuildType(FirmwareBuildType_t void FirmwareUpgradeController::_buildAPMFirmwareNames(void) { #if !defined(NO_ARDUPILOT_DIALECT) - qCDebug(FirmwareUpgradeLog) << "_buildAPMFirmwareNames" << _foundBoardInfo.description() << _foundBoardInfo.vendorIdentifier() << _foundBoardInfo.productIdentifier(); - bool chibios = _apmChibiOSSetting->rawValue().toInt() == 0; - FirmwareVehicleType_t vehicleType = static_cast(_apmVehicleTypeSetting->rawValue().toInt()); + bool chibios = _apmChibiOSSetting->rawValue().toInt() == 0; + FirmwareVehicleType_t vehicleType = static_cast(_apmVehicleTypeSetting->rawValue().toInt()); + QString boardDescription = _foundBoardInfo.description(); + quint16 boardVID = _foundBoardInfo.vendorIdentifier(); + quint16 boardPID = _foundBoardInfo.productIdentifier(); + +#if 0 + // This is left in for debugging manifest problems + boardDescription = "KakuteF7"; + boardVID = 1155; + boardPID = 22336; +#endif + + qCDebug(FirmwareUpgradeLog) << QStringLiteral("_buildAPMFirmwareNames description(%1) vid(%2/0x%3) pid(%4/0x%5)").arg(boardDescription).arg(boardVID).arg(boardVID, 1, 16).arg(boardPID).arg(boardPID, 1, 16); _apmFirmwareNames.clear(); _apmFirmwareUrls.clear(); QString apmDescriptionSuffix("-BL"); - bool bootloaderMatch = _foundBoardInfo.description().endsWith(apmDescriptionSuffix); + bool bootloaderMatch = boardDescription.endsWith(apmDescriptionSuffix); for (const ManifestFirmwareInfo_t& firmwareInfo: _rgManifestFirmwareInfo) { bool match = false; if (firmwareInfo.firmwareBuildType == _selectedFirmwareBuildType && firmwareInfo.chibios == chibios && firmwareInfo.vehicleType == vehicleType) { if (bootloaderMatch) { - if (firmwareInfo.rgBootloaderPortString.contains(_foundBoardInfo.description())) { - qCDebug(FirmwareUpgradeLog) << "Bootloader match:" << firmwareInfo.friendlyName << _foundBoardInfo.description() << firmwareInfo.rgBootloaderPortString << firmwareInfo.url << firmwareInfo.vehicleType; + if (firmwareInfo.rgBootloaderPortString.contains(boardDescription)) { + qCDebug(FirmwareUpgradeLog) << "Bootloader match:" << firmwareInfo.friendlyName << boardDescription << firmwareInfo.rgBootloaderPortString << firmwareInfo.url << firmwareInfo.vehicleType; match = true; } } else { - if (firmwareInfo.rgVID.contains(_foundBoardInfo.vendorIdentifier()) && firmwareInfo.rgPID.contains(_foundBoardInfo.productIdentifier())) { - qCDebug(FirmwareUpgradeLog) << "Fallback match:" << firmwareInfo.friendlyName << _foundBoardInfo.vendorIdentifier() << _foundBoardInfo.productIdentifier() << _bootloaderBoardID << firmwareInfo.url << firmwareInfo.vehicleType; + if (firmwareInfo.rgVID.contains(boardVID) && firmwareInfo.rgPID.contains(boardPID)) { + qCDebug(FirmwareUpgradeLog) << "VID/PID match:" << firmwareInfo.friendlyName << boardVID << boardPID << _bootloaderBoardID << firmwareInfo.url << firmwareInfo.vehicleType; match = true; } } From e94a60834f6c5feb1f70b40cfec0802a42fde6e3 Mon Sep 17 00:00:00 2001 From: DoinLakeFlyer Date: Fri, 28 Feb 2020 12:35:39 -0800 Subject: [PATCH 13/16] Fix broken ADSB vehicle code --- src/Vehicle/Vehicle.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Vehicle/Vehicle.cc b/src/Vehicle/Vehicle.cc index 6b8b623..ad811a2 100644 --- a/src/Vehicle/Vehicle.cc +++ b/src/Vehicle/Vehicle.cc @@ -3878,7 +3878,8 @@ void Vehicle::_handleADSBVehicle(const mavlink_message_t& message) vehicleInfo.availableFlags = 0; vehicleInfo.location.setLatitude(adsbVehicleMsg.lat / 1e7); - vehicleInfo.location.setLatitude(adsbVehicleMsg.lon / 1e7); + vehicleInfo.location.setLongitude(adsbVehicleMsg.lon / 1e7); + vehicleInfo.availableFlags |= ADSBVehicle::LocationAvailable; vehicleInfo.callsign = adsbVehicleMsg.callsign; vehicleInfo.availableFlags |= ADSBVehicle::CallsignAvailable; From fe365c7d97712fa943b618d5f6044d2a5c03ed04 Mon Sep 17 00:00:00 2001 From: DonLakeFlyer Date: Fri, 28 Feb 2020 13:24:06 -0800 Subject: [PATCH 14/16] Vehicle command send logging --- src/Vehicle/Vehicle.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Vehicle/Vehicle.cc b/src/Vehicle/Vehicle.cc index 6b8b623..b6e4301 100644 --- a/src/Vehicle/Vehicle.cc +++ b/src/Vehicle/Vehicle.cc @@ -3323,6 +3323,8 @@ void Vehicle::_sendMavCommandAgain() _mavCommandAckTimer.start(); + qCDebug(VehicleLog) << "_sendMavCommandAgain sending" << queuedCommand.command; + mavlink_message_t msg; if (queuedCommand.commandInt) { mavlink_command_int_t cmd; @@ -3428,6 +3430,8 @@ void Vehicle::_handleCommandAck(mavlink_message_t& message) mavlink_command_ack_t ack; mavlink_msg_command_ack_decode(&message, &ack); + qCDebug(VehicleLog) << QStringLiteral("_handleCommandAck command(%1) result(%2)").arg(ack.command).arg(ack.result); + if (ack.command == MAV_CMD_REQUEST_AUTOPILOT_CAPABILITIES && ack.result != MAV_RESULT_ACCEPTED) { qCDebug(VehicleLog) << QStringLiteral("Vehicle responded to MAV_CMD_REQUEST_AUTOPILOT_CAPABILITIES with error(%1). Setting no capabilities.").arg(ack.result); _handleUnsupportedRequestAutopilotCapabilities(); From 52d8a5528f49d3e802c134d7ee6f90b23fdf0d94 Mon Sep 17 00:00:00 2001 From: Jacob Dahl Date: Fri, 28 Feb 2020 16:20:23 -0900 Subject: [PATCH 15/16] Fixes offline checklist handling to load the correct checklist based on the saved app setting fact --- src/FlightDisplay/PreFlightCheckList.qml | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/src/FlightDisplay/PreFlightCheckList.qml b/src/FlightDisplay/PreFlightCheckList.qml index af5c2b7..7e040d4 100644 --- a/src/FlightDisplay/PreFlightCheckList.qml +++ b/src/FlightDisplay/PreFlightCheckList.qml @@ -23,7 +23,9 @@ Rectangle { color: qgcPal.windowShade radius: 3 - property real _verticalMargin: ScreenTools.defaultFontPixelHeight / 2 + property real _verticalMargin: ScreenTools.defaultFontPixelHeight / 2 + property var _offlineEditingVehicleType: QGroundControl.settingsManager.appSettings.offlineEditingVehicleType + Loader { id: modelContainer @@ -82,6 +84,27 @@ Rectangle { } return } + + // "enumStrings": "Fixed Wing,Multi-Rotor,VTOL,Rover,Sub", + // "enumValues": "1,2,20,10,12", + switch (_offlineEditingVehicleType.rawValue) { + case 1: + modelContainer.source = "/checklists/FixedWingChecklist.qml" + return + case 2: + modelContainer.source = "/checklists/MultiRotorChecklist.qml" + return + case 20: + modelContainer.source = "/checklists/VTOLChecklist.qml" + return + case 10: + modelContainer.source = "/checklists/RoverChecklist.qml" + return + case 12: + modelContainer.source = "/checklists/SubChecklist.qml" + return + } + modelContainer.source = "/checklists/DefaultChecklist.qml" } From ae58e70942be1d6f737a9a67c80414b3c2c17d4e Mon Sep 17 00:00:00 2001 From: Jacob Dahl Date: Sat, 29 Feb 2020 15:05:05 -0900 Subject: [PATCH 16/16] updated from reviewer feedback --- src/FlightDisplay/PreFlightCheckList.qml | 55 ++++++++++---------------------- 1 file changed, 17 insertions(+), 38 deletions(-) diff --git a/src/FlightDisplay/PreFlightCheckList.qml b/src/FlightDisplay/PreFlightCheckList.qml index 7e040d4..6115e3f 100644 --- a/src/FlightDisplay/PreFlightCheckList.qml +++ b/src/FlightDisplay/PreFlightCheckList.qml @@ -23,9 +23,7 @@ Rectangle { color: qgcPal.windowShade radius: 3 - property real _verticalMargin: ScreenTools.defaultFontPixelHeight / 2 - property var _offlineEditingVehicleType: QGroundControl.settingsManager.appSettings.offlineEditingVehicleType - + property real _verticalMargin: ScreenTools.defaultFontPixelHeight / 2 Loader { id: modelContainer @@ -68,44 +66,25 @@ Rectangle { //-- Pick a checklist model that matches the current airframe type (if any) function _updateModel() { - if(activeVehicle) { - if(activeVehicle.multiRotor) { - modelContainer.source = "/checklists/MultiRotorChecklist.qml" - } else if(activeVehicle.vtol) { - modelContainer.source = "/checklists/VTOLChecklist.qml" - } else if(activeVehicle.rover) { - modelContainer.source = "/checklists/RoverChecklist.qml" - } else if(activeVehicle.sub) { - modelContainer.source = "/checklists/SubChecklist.qml" - } else if(activeVehicle.fixedWing) { - modelContainer.source = "/checklists/FixedWingChecklist.qml" - } else { - modelContainer.source = "/checklists/DefaultChecklist.qml" - } - return + var vehicle = activeVehicle + if (!vehicle) { + vehicle = QGroundControl.multiVehicleManager.offlineEditingVehicle } - // "enumStrings": "Fixed Wing,Multi-Rotor,VTOL,Rover,Sub", - // "enumValues": "1,2,20,10,12", - switch (_offlineEditingVehicleType.rawValue) { - case 1: - modelContainer.source = "/checklists/FixedWingChecklist.qml" - return - case 2: - modelContainer.source = "/checklists/MultiRotorChecklist.qml" - return - case 20: - modelContainer.source = "/checklists/VTOLChecklist.qml" - return - case 10: - modelContainer.source = "/checklists/RoverChecklist.qml" - return - case 12: - modelContainer.source = "/checklists/SubChecklist.qml" - return + if(vehicle.multiRotor) { + modelContainer.source = "/checklists/MultiRotorChecklist.qml" + } else if(vehicle.vtol) { + modelContainer.source = "/checklists/VTOLChecklist.qml" + } else if(vehicle.rover) { + modelContainer.source = "/checklists/RoverChecklist.qml" + } else if(vehicle.sub) { + modelContainer.source = "/checklists/SubChecklist.qml" + } else if(vehicle.fixedWing) { + modelContainer.source = "/checklists/FixedWingChecklist.qml" + } else { + modelContainer.source = "/checklists/DefaultChecklist.qml" } - - modelContainer.source = "/checklists/DefaultChecklist.qml" + return } Component.onCompleted: {