Skip to content

Commit

Permalink
Merge branch 'master' into planmanager-memleak
Browse files Browse the repository at this point in the history
  • Loading branch information
AsensioL authored Mar 1, 2025
2 parents 49e87d8 + bc724b5 commit c961870
Show file tree
Hide file tree
Showing 73 changed files with 1,003 additions and 1,320 deletions.
2 changes: 1 addition & 1 deletion cmake/CreateWinInstaller.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ set(QGC_NSIS_INSTALLER_PARAMETERS
/DAPPNAME=QGroundControl
/DEXENAME=QGroundControl
/DORGNAME=org.mavlink.qgroundcontrol
/DDESTDIR=${CMAKE_BINARY_DIR}/staging
/DDESTDIR=${CMAKE_INSTALL_PREFIX}
/NOCD
"/XOutFile ${QGC_INSTALLER_OUT}"
${QGC_NSIS_INSTALLER_SCRIPT}
Expand Down
4 changes: 2 additions & 2 deletions custom-example/qgcimages.qrc
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@
<file alias="DatalinkLossLight.svg">../src/AutoPilotPlugins/PX4/Images/DatalinkLossLight.svg</file>
<file alias="Disarmed.svg">../src/UI/toolbar/Images/Disarmed.svg</file>
<file alias="Disconnect.svg">../src/UI/toolbar/Images/Disconnect.svg</file>
<file alias="FirmwareUpgradeIcon.png">../src/VehicleSetup/FirmwareUpgradeIcon.png</file>
<file alias="FirmwareUpgradeIcon.png">../src/Vehicle/VehicleSetup/FirmwareUpgradeIcon.png</file>
<file alias="FollowComponentIcon.png">../src/AutoPilotPlugins/Common/Images/FlightModesComponentIcon.png</file>
<file alias="FlightModesComponentIcon.png">../src/AutoPilotPlugins/Common/Images/FlightModesComponentIcon.png</file>
<file alias="FloatingWindow.svg">../src/AnalyzeView/FloatingWindow.svg</file>
Expand Down Expand Up @@ -202,7 +202,7 @@
<file alias="VehicleNoseDownRotate.png">../src/AutoPilotPlugins/PX4/Images/VehicleNoseDownRotate.png</file>
<file alias="VehicleRight.png">../src/AutoPilotPlugins/PX4/Images/VehicleRight.png</file>
<file alias="VehicleRightRotate.png">../src/AutoPilotPlugins/PX4/Images/VehicleRightRotate.png</file>
<file alias="VehicleSummaryIcon.png">../src/VehicleSetup/VehicleSummaryIcon.png</file>
<file alias="VehicleSummaryIcon.png">../src/Vehicle/VehicleSetup/VehicleSummaryIcon.png</file>
<file alias="VehicleTailDown.png">../src/AutoPilotPlugins/PX4/Images/VehicleTailDown.png</file>
<file alias="VehicleTailDownRotate.png">../src/AutoPilotPlugins/PX4/Images/VehicleTailDownRotate.png</file>
<file alias="VehicleUpsideDown.png">../src/AutoPilotPlugins/PX4/Images/VehicleUpsideDown.png</file>
Expand Down
20 changes: 10 additions & 10 deletions custom-example/qgroundcontrol.qrc
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
<file alias="RemoteIDSettings.qml">../src/UI/preferences/RemoteIDSettings.qml</file>
<file alias="ESP8266Component.qml">../src/AutoPilotPlugins/Common/ESP8266Component.qml</file>
<file alias="ESP8266ComponentSummary.qml">../src/AutoPilotPlugins/Common/ESP8266ComponentSummary.qml</file>
<file alias="FirmwareUpgrade.qml">../src/VehicleSetup/FirmwareUpgrade.qml</file>
<file alias="FirmwareUpgrade.qml">../src/Vehicle/VehicleSetup/FirmwareUpgrade.qml</file>
<file alias="QGroundControl/FlightDisplay/QGCVideoBackground.qml">../src/FlightDisplay/QGCVideoBackground.qml</file>
<file alias="FlightDisplayViewDummy.qml">../src/FlightDisplay/FlightDisplayViewDummy.qml</file>
<file alias="FlightDisplayViewUVC.qml">../src/FlightDisplay/FlightDisplayViewUVC.qml</file>
Expand All @@ -51,11 +51,11 @@
<file alias="HelpSettings.qml">../src/UI/preferences/HelpSettings.qml</file>
<file alias="IntegratedAttitudeIndicator.qml">../src/FlightMap/Widgets/IntegratedAttitudeIndicator.qml</file>
<file alias="IntegratedCompassAttitude.qml">../src/FlightMap/Widgets/IntegratedCompassAttitude.qml</file>
<file alias="JoystickConfig.qml">../src/VehicleSetup/JoystickConfig.qml</file>
<file alias="JoystickConfigAdvanced.qml">../src/VehicleSetup/JoystickConfigAdvanced.qml</file>
<file alias="JoystickConfigButtons.qml">../src/VehicleSetup/JoystickConfigButtons.qml</file>
<file alias="JoystickConfigCalibration.qml">../src/VehicleSetup/JoystickConfigCalibration.qml</file>
<file alias="JoystickConfigGeneral.qml">../src/VehicleSetup/JoystickConfigGeneral.qml</file>
<file alias="JoystickConfig.qml">../src/Vehicle/VehicleSetup/JoystickConfig.qml</file>
<file alias="JoystickConfigAdvanced.qml">../src/Vehicle/VehicleSetup/JoystickConfigAdvanced.qml</file>
<file alias="JoystickConfigButtons.qml">../src/Vehicle/VehicleSetup/JoystickConfigButtons.qml</file>
<file alias="JoystickConfigCalibration.qml">../src/Vehicle/VehicleSetup/JoystickConfigCalibration.qml</file>
<file alias="JoystickConfigGeneral.qml">../src/Vehicle/VehicleSetup/JoystickConfigGeneral.qml</file>
<file alias="LinkSettings.qml">../src/UI/preferences/LinkSettings.qml</file>
<file alias="LogDownloadPage.qml">../src/AnalyzeView/LogDownloadPage.qml</file>
<file alias="LogReplaySettings.qml">../src/UI/preferences/LogReplaySettings.qml</file>
Expand All @@ -74,7 +74,7 @@
<file alias="PlanViewSettings.qml">../src/UI/preferences/PlanViewSettings.qml</file>
<file alias="PlanViewToolBar.qml">../src/UI/toolbar/PlanViewToolBar.qml</file>
<file alias="PreFlightCheckList.qml">../src/FlightDisplay/PreFlightCheckList.qml</file>
<file alias="OpticalFlowSensor.qml">../src/VehicleSetup/OpticalFlowSensor.qml</file>
<file alias="OpticalFlowSensor.qml">../src/Vehicle/VehicleSetup/OpticalFlowSensor.qml</file>
<file alias="VerticalCompassAttitude.qml">../src/FlightMap/Widgets/VerticalCompassAttitude.qml</file>
<file alias="HorizontalCompassAttitude.qml">../src/FlightMap/Widgets/HorizontalCompassAttitude.qml</file>
<file alias="QGroundControl/Controls/AnalyzePage.qml">../src/AnalyzeView/AnalyzePage.qml</file>
Expand Down Expand Up @@ -283,8 +283,8 @@
<file alias="QGroundControl/ScreenTools/ScreenTools.qml">../src/QmlControls/ScreenTools.qml</file>
<file alias="RadioComponent.qml">../src/AutoPilotPlugins/Common/RadioComponent.qml</file>
<file alias="SerialSettings.qml">../src/UI/preferences/SerialSettings.qml</file>
<file alias="SetupParameterEditor.qml">../src/VehicleSetup/SetupParameterEditor.qml</file>
<file alias="SetupView.qml">../src/VehicleSetup/SetupView.qml</file>
<file alias="SetupParameterEditor.qml">../src/Vehicle/VehicleSetup/SetupParameterEditor.qml</file>
<file alias="SetupView.qml">../src/Vehicle/VehicleSetup/SetupView.qml</file>
<file alias="SettingsPage.qml">../src/UI/preferences/SettingsPage.qml</file>
<file alias="SettingsPagesModel.qml">../src/UI/SettingsPagesModel.qml</file>
<file alias="SimpleItemEditor.qml">../src/PlanView/SimpleItemEditor.qml</file>
Expand All @@ -294,7 +294,7 @@
<file alias="TcpSettings.qml">../src/UI/preferences/TcpSettings.qml</file>
<file alias="TelemetrySettings.qml">../src/UI/preferences/TelemetrySettings.qml</file>
<file alias="UdpSettings.qml">../src/UI/preferences/UdpSettings.qml</file>
<file alias="VehicleSummary.qml">../src/VehicleSetup/VehicleSummary.qml</file>
<file alias="VehicleSummary.qml">../src/Vehicle/VehicleSetup/VehicleSummary.qml</file>
<file alias="VibrationPage.qml">../src/AnalyzeView/VibrationPage.qml</file>
<file alias="VideoSettings.qml">../src/UI/preferences/VideoSettings.qml</file>
<file alias="VirtualJoystick.qml">../src/FlightDisplay/VirtualJoystick.qml</file>
Expand Down
4 changes: 2 additions & 2 deletions qgcimages.qrc
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@
<file alias="DatalinkLossLight.svg">src/AutoPilotPlugins/PX4/Images/DatalinkLossLight.svg</file>
<file alias="Disarmed.svg">src/UI/toolbar/Images/Disarmed.svg</file>
<file alias="Disconnect.svg">src/UI/toolbar/Images/Disconnect.svg</file>
<file alias="FirmwareUpgradeIcon.png">src/VehicleSetup/FirmwareUpgradeIcon.png</file>
<file alias="FirmwareUpgradeIcon.png">src/Vehicle/VehicleSetup/FirmwareUpgradeIcon.png</file>
<file alias="FollowComponentIcon.png">src/AutoPilotPlugins/Common/Images/FlightModesComponentIcon.png</file>
<file alias="FlightModesComponentIcon.png">src/AutoPilotPlugins/Common/Images/FlightModesComponentIcon.png</file>
<file alias="FloatingWindow.svg">src/AnalyzeView/FloatingWindow.svg</file>
Expand Down Expand Up @@ -203,7 +203,7 @@
<file alias="VehicleNoseDownRotate.png">src/AutoPilotPlugins/PX4/Images/VehicleNoseDownRotate.png</file>
<file alias="VehicleRight.png">src/AutoPilotPlugins/PX4/Images/VehicleRight.png</file>
<file alias="VehicleRightRotate.png">src/AutoPilotPlugins/PX4/Images/VehicleRightRotate.png</file>
<file alias="VehicleSummaryIcon.png">src/VehicleSetup/VehicleSummaryIcon.png</file>
<file alias="VehicleSummaryIcon.png">src/Vehicle/VehicleSetup/VehicleSummaryIcon.png</file>
<file alias="VehicleTailDown.png">src/AutoPilotPlugins/PX4/Images/VehicleTailDown.png</file>
<file alias="VehicleTailDownRotate.png">src/AutoPilotPlugins/PX4/Images/VehicleTailDownRotate.png</file>
<file alias="VehicleUpsideDown.png">src/AutoPilotPlugins/PX4/Images/VehicleUpsideDown.png</file>
Expand Down
20 changes: 10 additions & 10 deletions qgroundcontrol.qrc
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
<file alias="RemoteIDSettings.qml">src/UI/preferences/RemoteIDSettings.qml</file>
<file alias="ESP8266Component.qml">src/AutoPilotPlugins/Common/ESP8266Component.qml</file>
<file alias="ESP8266ComponentSummary.qml">src/AutoPilotPlugins/Common/ESP8266ComponentSummary.qml</file>
<file alias="FirmwareUpgrade.qml">src/VehicleSetup/FirmwareUpgrade.qml</file>
<file alias="FirmwareUpgrade.qml">src/Vehicle/VehicleSetup/FirmwareUpgrade.qml</file>
<file alias="QGroundControl/FlightDisplay/QGCVideoBackground.qml">src/FlightDisplay/QGCVideoBackground.qml</file>
<file alias="FlightDisplayViewDummy.qml">src/FlightDisplay/FlightDisplayViewDummy.qml</file>
<file alias="FlightDisplayViewUVC.qml">src/FlightDisplay/FlightDisplayViewUVC.qml</file>
Expand All @@ -51,11 +51,11 @@
<file alias="HelpSettings.qml">src/UI/preferences/HelpSettings.qml</file>
<file alias="IntegratedAttitudeIndicator.qml">src/FlightMap/Widgets/IntegratedAttitudeIndicator.qml</file>
<file alias="IntegratedCompassAttitude.qml">src/FlightMap/Widgets/IntegratedCompassAttitude.qml</file>
<file alias="JoystickConfig.qml">src/VehicleSetup/JoystickConfig.qml</file>
<file alias="JoystickConfigAdvanced.qml">src/VehicleSetup/JoystickConfigAdvanced.qml</file>
<file alias="JoystickConfigButtons.qml">src/VehicleSetup/JoystickConfigButtons.qml</file>
<file alias="JoystickConfigCalibration.qml">src/VehicleSetup/JoystickConfigCalibration.qml</file>
<file alias="JoystickConfigGeneral.qml">src/VehicleSetup/JoystickConfigGeneral.qml</file>
<file alias="JoystickConfig.qml">src/Vehicle/VehicleSetup/JoystickConfig.qml</file>
<file alias="JoystickConfigAdvanced.qml">src/Vehicle/VehicleSetup/JoystickConfigAdvanced.qml</file>
<file alias="JoystickConfigButtons.qml">src/Vehicle/VehicleSetup/JoystickConfigButtons.qml</file>
<file alias="JoystickConfigCalibration.qml">src/Vehicle/VehicleSetup/JoystickConfigCalibration.qml</file>
<file alias="JoystickConfigGeneral.qml">src/Vehicle/VehicleSetup/JoystickConfigGeneral.qml</file>
<file alias="LinkSettings.qml">src/UI/preferences/LinkSettings.qml</file>
<file alias="LogDownloadPage.qml">src/AnalyzeView/LogDownloadPage.qml</file>
<file alias="LogReplaySettings.qml">src/UI/preferences/LogReplaySettings.qml</file>
Expand All @@ -73,7 +73,7 @@
<file alias="PlanViewSettings.qml">src/UI/preferences/PlanViewSettings.qml</file>
<file alias="PlanViewToolBar.qml">src/UI/toolbar/PlanViewToolBar.qml</file>
<file alias="PreFlightCheckList.qml">src/FlightDisplay/PreFlightCheckList.qml</file>
<file alias="OpticalFlowSensor.qml">src/VehicleSetup/OpticalFlowSensor.qml</file>
<file alias="OpticalFlowSensor.qml">src/Vehicle/VehicleSetup/OpticalFlowSensor.qml</file>
<file alias="VerticalCompassAttitude.qml">src/FlightMap/Widgets/VerticalCompassAttitude.qml</file>
<file alias="HorizontalCompassAttitude.qml">src/FlightMap/Widgets/HorizontalCompassAttitude.qml</file>
<file alias="QGroundControl/Controls/AnalyzePage.qml">src/AnalyzeView/AnalyzePage.qml</file>
Expand Down Expand Up @@ -294,8 +294,8 @@
<file alias="QGroundControl/ScreenTools/ScreenTools.qml">src/QmlControls/ScreenTools.qml</file>
<file alias="RadioComponent.qml">src/AutoPilotPlugins/Common/RadioComponent.qml</file>
<file alias="SerialSettings.qml">src/UI/preferences/SerialSettings.qml</file>
<file alias="SetupParameterEditor.qml">src/VehicleSetup/SetupParameterEditor.qml</file>
<file alias="SetupView.qml">src/VehicleSetup/SetupView.qml</file>
<file alias="SetupParameterEditor.qml">src/Vehicle/VehicleSetup/SetupParameterEditor.qml</file>
<file alias="SetupView.qml">src/Vehicle/VehicleSetup/SetupView.qml</file>
<file alias="SettingsPage.qml">src/UI/preferences/SettingsPage.qml</file>
<file alias="SettingsPagesModel.qml">src/UI/SettingsPagesModel.qml</file>
<file alias="SimpleItemEditor.qml">src/PlanView/SimpleItemEditor.qml</file>
Expand All @@ -305,7 +305,7 @@
<file alias="TcpSettings.qml">src/UI/preferences/TcpSettings.qml</file>
<file alias="TelemetrySettings.qml">src/UI/preferences/TelemetrySettings.qml</file>
<file alias="UdpSettings.qml">src/UI/preferences/UdpSettings.qml</file>
<file alias="VehicleSummary.qml">src/VehicleSetup/VehicleSummary.qml</file>
<file alias="VehicleSummary.qml">src/Vehicle/VehicleSetup/VehicleSummary.qml</file>
<file alias="VibrationPage.qml">src/AnalyzeView/VibrationPage.qml</file>
<file alias="VideoSettings.qml">src/UI/preferences/VideoSettings.qml</file>
<file alias="VirtualJoystick.qml">src/FlightDisplay/VirtualJoystick.qml</file>
Expand Down
19 changes: 14 additions & 5 deletions src/AnalyzeView/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -117,15 +117,24 @@ CPMAddPackage(
"EXPAT_SHARED_LIBS OFF"
)

if(TARGET EXPAT::EXPAT)
set(_EXIV2_ENABLE_XMP ON)
else()
set(_EXIV2_ENABLE_XMP OFF)
set(_EXIV2_ENABLE_XMP OFF)
if(EXPAT_ADDED)
find_package(expat CONFIG QUIET)
if(NOT TARGET expat::expat)
find_package(EXPAT MODULE)
if(EXPAT_FOUND)
if(NOT TARGET expat::expat)
add_library(expat::expat INTERFACE IMPORTED)
target_link_libraries(expat::expat INTERFACE EXPAT::EXPAT)
endif()
set(_EXIV2_ENABLE_XMP ON)
endif()
endif()
endif()

CPMAddPackage(
NAME exiv2
VERSION 0.28.4
VERSION 0.28.5
GITHUB_REPOSITORY Exiv2/exiv2
OPTIONS
"EXIV2_ENABLE_XMP ${_EXIV2_ENABLE_XMP}"
Expand Down
2 changes: 0 additions & 2 deletions src/AutoPilotPlugins/APM/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,8 @@ target_link_libraries(APMAutoPilotPlugin
Qt6::Core
Qt6::Quick
AutoPilotPlugins
CommonAutoPilotPlugin
FactControls
MAVLink
VehicleSetup
)

target_include_directories(APMAutoPilotPlugin PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
Expand Down
48 changes: 21 additions & 27 deletions src/AutoPilotPlugins/AutoPilotPlugin.cc
Original file line number Diff line number Diff line change
Expand Up @@ -7,44 +7,43 @@
*
****************************************************************************/


/// @file
/// @author Don Gagne <[email protected]>

#include "AutoPilotPlugin.h"
#include "QGCApplication.h"
#include "FirmwarePlugin.h"
#include "QGCApplication.h"
#include "QGCLoggingCategory.h"
#include "Vehicle.h"
#include "VehicleComponent.h"

#include <QtCore/QCoreApplication>

AutoPilotPlugin::AutoPilotPlugin(Vehicle* vehicle, QObject* parent)
QGC_LOGGING_CATEGORY(AutoPilotPluginLog, "qgc.autopilotplugin.autopilotplugin");

AutoPilotPlugin::AutoPilotPlugin(Vehicle *vehicle, QObject *parent)
: QObject(parent)
, _vehicle(vehicle)
, _firmwarePlugin(vehicle->firmwarePlugin())
, _setupComplete(false)
{

// qCDebug(AutoPilotPluginLog) << Q_FUNC_INFO << this;
}

AutoPilotPlugin::~AutoPilotPlugin()
{

// qCDebug(AutoPilotPluginLog) << Q_FUNC_INFO << this;
}

void AutoPilotPlugin::_recalcSetupComplete(void)
void AutoPilotPlugin::_recalcSetupComplete()
{
bool newSetupComplete = true;

for(const QVariant& componentVariant: vehicleComponents()) {
VehicleComponent* component = qobject_cast<VehicleComponent*>(qvariant_cast<QObject *>(componentVariant));
for (const QVariant &componentVariant : vehicleComponents()) {
const VehicleComponent *const component = qobject_cast<const VehicleComponent*>(qvariant_cast<const QObject*>(componentVariant));
if (component) {
if (!component->setupComplete()) {
newSetupComplete = false;
break;
}
} else {
qWarning() << "AutoPilotPlugin::_recalcSetupComplete Incorrectly typed VehicleComponent";
qCWarning(AutoPilotPluginLog) << "Incorrectly typed VehicleComponent";
}
}

Expand All @@ -54,22 +53,17 @@ void AutoPilotPlugin::_recalcSetupComplete(void)
}
}

bool AutoPilotPlugin::setupComplete(void) const
{
return _setupComplete;
}

void AutoPilotPlugin::parametersReadyPreChecks(void)
void AutoPilotPlugin::parametersReadyPreChecks()
{
_recalcSetupComplete();

// Connect signals in order to keep setupComplete up to date
for(QVariant componentVariant: vehicleComponents()) {
VehicleComponent* component = qobject_cast<VehicleComponent*>(qvariant_cast<QObject *>(componentVariant));
for (QVariant componentVariant : vehicleComponents()) {
VehicleComponent *const component = qobject_cast<VehicleComponent*>(qvariant_cast<QObject*>(componentVariant));
if (component) {
connect(component, &VehicleComponent::setupCompleteChanged, this, &AutoPilotPlugin::_recalcSetupComplete);
(void) connect(component, &VehicleComponent::setupCompleteChanged, this, &AutoPilotPlugin::_recalcSetupComplete);
} else {
qWarning() << "AutoPilotPlugin::_recalcSetupComplete Incorrectly typed VehicleComponent";
qCWarning(AutoPilotPluginLog) << "Incorrectly typed VehicleComponent";
}
}

Expand All @@ -82,12 +76,12 @@ void AutoPilotPlugin::parametersReadyPreChecks(void)
}
}

VehicleComponent* AutoPilotPlugin::findKnownVehicleComponent(KnownVehicleComponent knownVehicleComponent)
VehicleComponent *AutoPilotPlugin::findKnownVehicleComponent(KnownVehicleComponent knownVehicleComponent)
{
if (knownVehicleComponent != UnknownVehicleComponent) {
for(const QVariant& componentVariant: vehicleComponents()) {
VehicleComponent* component = qobject_cast<VehicleComponent*>(qvariant_cast<QObject *>(componentVariant));
if (component && component->KnownVehicleComponent() == knownVehicleComponent) {
for (const QVariant &componentVariant: vehicleComponents()) {
VehicleComponent *const component = qobject_cast<VehicleComponent*>(qvariant_cast<QObject *>(componentVariant));
if (component && (component->KnownVehicleComponent() == knownVehicleComponent)) {
return component;
}
}
Expand Down
Loading

0 comments on commit c961870

Please sign in to comment.