From 62f622d6978eaf51d32a63ff6715183812b2d418 Mon Sep 17 00:00:00 2001 From: Niki-dev12 Date: Mon, 4 Aug 2025 15:42:15 +0200 Subject: [PATCH 01/11] Feature: Add QML-configurable gimbal max speed and deadzones --- src/Joystick/Joystick.cc | 94 +++++++++++++++- src/Joystick/Joystick.h | 23 ++++ .../JoystickConfigCalibration.qml | 104 +++++++++++++++++- .../VehicleSetup/JoystickConfigController.cc | 8 +- 4 files changed, 223 insertions(+), 6 deletions(-) diff --git a/src/Joystick/Joystick.cc b/src/Joystick/Joystick.cc index 23a35c1ea860..cf747f6d143b 100644 --- a/src/Joystick/Joystick.cc +++ b/src/Joystick/Joystick.cc @@ -576,6 +576,50 @@ void Joystick::_handleButtons() } } +float applyDeadzone(float value, float deadzone) { + if (std::abs(value) < deadzone) { + return 0.0f; + }else if(value<0){ + value=value+deadzone; + }else if(value>0){ + value=value-deadzone; + } + return value; + } + +void Joystick::setGimbalYawDeadzone(int deadzone) { + if (_rgCalibration[4].deadband != deadzone) { + _rgCalibration[4].deadband = deadzone; + _saveSettings(); + emit gimbalYawDeadzoneChanged(); + } +} +void Joystick::setGimbalPitchDeadzone(int deadzone) { + if (_rgCalibration[5].deadband != deadzone) { + _rgCalibration[5].deadband = deadzone; + _saveSettings(); + emit gimbalPitchDeadzoneChanged(); + } +} +void Joystick::setGimbalMaxSpeed(int speed) +{ + if (_gimbalMaxSpeed != speed) { + _gimbalMaxSpeed = speed; + emit gimbalMaxSpeedChanged(); + _saveSettings(); + } +} + +void Joystick::setGimbalAxisEnabled(bool enabled) +{ + if (_gimbalAxisEnabled != enabled) { + _gimbalAxisEnabled = enabled; + emit gimbalAxisEnabledChanged(enabled); + _saveSettings(); + _activeVehicle->sendGimbalAbsolutePosition(0, 0); + } +} + void Joystick::_handleAxis() { const int axisDelay = static_cast(1000.0f / _axisFrequencyHz); @@ -609,17 +653,60 @@ void Joystick::_handleAxis() float throttle = _adjustRange(_rgAxisValues[axis], _rgCalibration[axis], (_throttleMode == ThrottleModeDownZero) ? false :_deadband); float gimbalPitch = 0.0f; + float gimbalYaw = 0.0f; + if (_axisCount > 4) { axis = _rgFunctionAxis[gimbalPitchFunction]; gimbalPitch = _adjustRange(_rgAxisValues[axis], _rgCalibration[axis],_deadband); } - float gimbalYaw = 0.0f; if (_axisCount > 5) { axis = _rgFunctionAxis[gimbalYawFunction]; gimbalYaw = _adjustRange(_rgAxisValues[axis], _rgCalibration[axis],_deadband); } + if (_axisCount > 5 && _gimbalAxisEnabled) { + int pitchAxisIndex = 5; + float gimbalPitchNorm = _adjustRange(_rgAxisValues[pitchAxisIndex], _rgCalibration[pitchAxisIndex], _deadband); + // float gimbalPitchDeg = gimbalPitchNorm * 160.0f - 80.0f; + // float gimbalPitchDeg = gimbalPitchNorm * (2.0f * gimbalPitchMax) - gimbalPitchMax; + float gimbalPitchDeg = gimbalPitchNorm * (2.0f * static_cast(_gimbalMaxSpeed)) - static_cast(_gimbalMaxSpeed); + gimbalPitchDeg=gimbalPitchDeg-5; + + float gimbalPitchDeadzone = static_cast(_rgCalibration[5].deadband); + float gimbalPitchOut = applyDeadzone(gimbalPitchDeg, gimbalPitchDeadzone); + + int yawAxisIndex = 4; + float gimbalYawNorm = _adjustRange(_rgAxisValues[yawAxisIndex], _rgCalibration[yawAxisIndex], _deadband); + // float gimbalYawDeg = gimbalYawNorm * 160.0f - 80.0f; + float gimbalYawDeg = gimbalYawNorm * (2.0f * static_cast(_gimbalMaxSpeed)) - static_cast(_gimbalMaxSpeed); + gimbalYawDeg=gimbalYawDeg-4; + + float gimbalYawDeadzone = static_cast(_rgCalibration[4].deadband); + float gimbalYawOut = applyDeadzone(gimbalYawDeg, gimbalYawDeadzone); + + static int zeroPitchCount = 0; + static int zeroYawCount = 0; + + if (std::abs(gimbalPitchOut) == 0) { + zeroPitchCount++; + } else { + zeroPitchCount = 0; + } + + if (std::abs(gimbalYawOut) == 0) { + zeroYawCount++; + } else { + zeroYawCount = 0; + } + + if (zeroPitchCount >= 3 && zeroYawCount >= 3) { + + }else{ + _activeVehicle->sendGimbalAbsolutePosition(gimbalPitchOut, gimbalYawOut); + // qDebug() << gimbalYawOut << gimbalPitchOut; + } + } if (_accumulator) { static float throttle_accu = 0.f; throttle_accu += (throttle * (40 / 1000.f)); // for throttle to change from min to max it will take 1000ms (40ms is a loop time) @@ -985,6 +1072,11 @@ void Joystick::setCalibrationMode(bool calibrating) _pollingStartedForCalibration = true; startPolling(MultiVehicleManager::instance()->activeVehicle()); } else if (_pollingStartedForCalibration) { + if (_axisCount > 5) { + _rgFunctionAxis[gimbalYawFunction] = 4; + _rgFunctionAxis[gimbalPitchFunction] = 5; + } + _saveSettings(); stopPolling(); } } diff --git a/src/Joystick/Joystick.h b/src/Joystick/Joystick.h index 95db3b2ea04a..fdb5e7313b90 100644 --- a/src/Joystick/Joystick.h +++ b/src/Joystick/Joystick.h @@ -82,6 +82,10 @@ class Joystick : public QThread Q_PROPERTY(QString name READ name CONSTANT) Q_PROPERTY(QStringList assignableActionTitles READ assignableActionTitles NOTIFY assignableActionsChanged) Q_PROPERTY(QStringList buttonActions READ buttonActions NOTIFY buttonActionsChanged) + Q_PROPERTY(int gimbalPitchDeadzone READ gimbalPitchDeadzone WRITE setGimbalPitchDeadzone NOTIFY gimbalPitchDeadzoneChanged) + Q_PROPERTY(int gimbalYawDeadzone READ gimbalYawDeadzone WRITE setGimbalYawDeadzone NOTIFY gimbalYawDeadzoneChanged) + Q_PROPERTY(bool gimbalAxisEnabled READ gimbalAxisEnabled WRITE setGimbalAxisEnabled NOTIFY gimbalAxisEnabledChanged) + Q_PROPERTY(int gimbalMaxSpeed READ gimbalMaxSpeed WRITE setGimbalMaxSpeed NOTIFY gimbalMaxSpeedChanged) enum ButtonEvent_t { BUTTON_UP, @@ -183,6 +187,17 @@ class Joystick : public QThread /// Set joystick button repeat rate (in Hz) void setButtonFrequency(float val); + int gimbalPitchDeadzone() const { return _rgCalibration[5].deadband; } + int gimbalYawDeadzone() const { return _rgCalibration[4].deadband; } + int gimbalMaxSpeed() const { return _gimbalMaxSpeed; } + + Q_INVOKABLE void setGimbalPitchDeadzone(int deadzone); + Q_INVOKABLE void setGimbalYawDeadzone(int deadzone); + Q_INVOKABLE void setGimbalMaxSpeed(int speed); + + bool gimbalAxisEnabled() const { return _gimbalAxisEnabled; } + Q_INVOKABLE void setGimbalAxisEnabled(bool enabled); + signals: // The raw signals are only meant for use by calibration void rawAxisValueChanged(int index, int value); @@ -224,6 +239,11 @@ class Joystick : public QThread void motorInterlock(bool enable); void unknownAction(const QString &action); + void gimbalPitchDeadzoneChanged(); + void gimbalYawDeadzoneChanged(); + void gimbalMaxSpeedChanged(); + void gimbalAxisEnabledChanged(bool enabled); + protected: void _setDefaultCalibration(); @@ -366,4 +386,7 @@ private slots: static constexpr const char *_buttonActionLandingGearRetract= QT_TR_NOOP("Landing gear retract"); static constexpr const char *_buttonActionMotorInterlockEnable= QT_TR_NOOP("Motor Interlock enable"); static constexpr const char *_buttonActionMotorInterlockDisable= QT_TR_NOOP("Motor Interlock disable"); + + bool _gimbalAxisEnabled = true; + int _gimbalMaxSpeed = 80; // Default max speed }; diff --git a/src/Vehicle/VehicleSetup/JoystickConfigCalibration.qml b/src/Vehicle/VehicleSetup/JoystickConfigCalibration.qml index 2b6a7d391dee..a5b33036de7f 100644 --- a/src/Vehicle/VehicleSetup/JoystickConfigCalibration.qml +++ b/src/Vehicle/VehicleSetup/JoystickConfigCalibration.qml @@ -13,11 +13,11 @@ import QtQuick.Dialogs import QtQuick.Layouts import QGroundControl - +import QGroundControl.Palette import QGroundControl.Controls import QGroundControl.ScreenTools - - +import QGroundControl.Controllers +import QGroundControl.FactSystem import QGroundControl.FactControls Item { @@ -197,6 +197,104 @@ Item { horizontalAlignment: Text.AlignHCenter anchors.horizontalCenter: parent.horizontalCenter } + + Rectangle { + width: parent.width * 0.9 + height: 100 + color: "transparent" + radius: 8 + anchors.horizontalCenter: parent.horizontalCenter + anchors.topMargin: ScreenTools.defaultFontPixelHeight + + Column { + anchors.margins: ScreenTools.defaultFontPixelHeight + spacing: ScreenTools.defaultFontPixelHeight * 0.5 + + QGCLabel { + text: qsTr("Gimbal Control Info") + font.bold: true + } + QGCLabel { + text: qsTr("Axis 5 = Gimbal Pitch | Axis 4 = Gimbal Yaw") + color: qgcPal.text + } + + // Gimbal Deadzone Axis 4 (Yaw) + Row { + spacing: ScreenTools.defaultFontPixelWidth * 2 + QGCLabel { + text: qsTr("Gimbal Yaw Deadzone (Axis 4):") + width: 220 + } + Slider { + id: yawDeadzoneSlider + width: 150 + from: 0 + to: 20 + stepSize: 1 + value: _activeJoystick ? _activeJoystick.gimbalYawDeadzone : 0 + onValueChanged: if (_activeJoystick) _activeJoystick.gimbalYawDeadzone = value + } + QGCLabel { text: yawDeadzoneSlider.value.toFixed(0) } + } + + // Gimbal Deadzone Axis 5 Pitch + Row { + spacing: ScreenTools.defaultFontPixelWidth * 2 + QGCLabel { + text: qsTr("Gimbal Pitch Deadzone (Axis 5):") + width: 220 + } + Slider { + id: pitchDeadzoneSlider + width: 150 + from: 0 + to: 20 + stepSize: 1 + value: _activeJoystick ? _activeJoystick.gimbalPitchDeadzone : 0 + onValueChanged: if (_activeJoystick) _activeJoystick.gimbalPitchDeadzone = value + } + QGCLabel { text: pitchDeadzoneSlider.value.toFixed(0) } + } + + // Gimbal Speed + Row { + spacing: ScreenTools.defaultFontPixelWidth * 2 + QGCLabel { + text: qsTr("Gimbal Max Speed:") + width: 220 + } + Slider { + id: speedSlider + width: 150 + from: 0 + to: 100 + stepSize: 1 + value: _activeJoystick ? _activeJoystick.gimbalMaxSpeed : 0 + onValueChanged: if (_activeJoystick) _activeJoystick.gimbalMaxSpeed = value + } + QGCLabel { text: speedSlider.value.toFixed(0) } + } + + Row { + spacing: ScreenTools.defaultFontPixelWidth * 2 + QGCLabel { + text: qsTr("Gimbal Axis Control:") + width: 220 + } + Switch { + id: gimbalAxisSwitch + checked: _activeJoystick ? _activeJoystick.gimbalAxisEnabled : true + onToggled: if (_activeJoystick) _activeJoystick.gimbalAxisEnabled = checked + } + QGCLabel { + text: gimbalAxisSwitch.checked ? qsTr("Enabled") : qsTr("Disabled") + } + } + + } + } + } } diff --git a/src/Vehicle/VehicleSetup/JoystickConfigController.cc b/src/Vehicle/VehicleSetup/JoystickConfigController.cc index 1981f6c1edc2..4644d28113e7 100644 --- a/src/Vehicle/VehicleSetup/JoystickConfigController.cc +++ b/src/Vehicle/VehicleSetup/JoystickConfigController.cc @@ -61,6 +61,8 @@ const JoystickConfigController::stateMachineEntry* JoystickConfigController::_ge static constexpr const char* msgPitchDown = "Move the Pitch stick all the way down and hold it there..."; static constexpr const char* msgPitchUp = "Move the Pitch stick all the way up and hold it there..."; static constexpr const char* msgPitchCenter = "Allow the Pitch stick to move back to center..."; + static constexpr const char* msgGimbalPitch = "Move the gimbal pitch axis/knob..."; + static constexpr const char* msgGimbalYaw = "Move the gimbal yaw axis/knob..."; static constexpr const char* msgComplete = "All settings have been captured.\nClick Next to enable the joystick."; static const stateMachineEntry rgStateMachine[] = { @@ -75,7 +77,9 @@ const JoystickConfigController::stateMachineEntry* JoystickConfigController::_ge { Joystick::pitchFunction, msgPitchUp, _sticksPitchUp, &JoystickConfigController::_inputStickDetect, nullptr, nullptr, 3 }, { Joystick::pitchFunction, msgPitchDown, _sticksPitchDown, &JoystickConfigController::_inputStickMin, nullptr, nullptr, 3 }, { Joystick::pitchFunction, msgPitchCenter, _sticksCentered, &JoystickConfigController::_inputCenterWait, nullptr, nullptr, 3 }, - { Joystick::maxFunction, msgComplete, _sticksCentered, nullptr, &JoystickConfigController::_writeCalibration, nullptr, -1 }, + { Joystick::gimbalPitchFunction, msgGimbalPitch, _sticksCentered, &JoystickConfigController::_inputStickDetect, nullptr, nullptr, 4 }, + { Joystick::gimbalYawFunction, msgGimbalYaw, _sticksCentered, &JoystickConfigController::_inputStickDetect, nullptr, nullptr, 5 }, + { Joystick::maxFunction, msgComplete, _sticksCentered, nullptr, &JoystickConfigController::_writeCalibration, nullptr, -1 }, }; Q_ASSERT(step >= 0 && step < static_cast((sizeof(rgStateMachine) / sizeof(rgStateMachine[0])))); @@ -263,7 +267,7 @@ void JoystickConfigController::_inputStickDetect(Joystick::AxisFunction_t functi if (_rgAxisInfo[axis].function != Joystick::maxFunction) { return; } - + if (_stickDetectAxis == _axisNoAxis) { // We have not detected enough movement on a axis yet if (abs(_axisValueSave[axis] - value) > _calMoveDelta) { From 9b14afcd960877b19f9601c2530420f6246bda2f Mon Sep 17 00:00:00 2001 From: Niki-dev12 Date: Mon, 11 Aug 2025 10:09:54 +0200 Subject: [PATCH 02/11] QML: replace deprecated QGroundControl.Palette import with QGroundControl.Controls --- src/Vehicle/VehicleSetup/JoystickConfigCalibration.qml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/Vehicle/VehicleSetup/JoystickConfigCalibration.qml b/src/Vehicle/VehicleSetup/JoystickConfigCalibration.qml index a5b33036de7f..f4758a377fb2 100644 --- a/src/Vehicle/VehicleSetup/JoystickConfigCalibration.qml +++ b/src/Vehicle/VehicleSetup/JoystickConfigCalibration.qml @@ -13,11 +13,7 @@ import QtQuick.Dialogs import QtQuick.Layouts import QGroundControl -import QGroundControl.Palette import QGroundControl.Controls -import QGroundControl.ScreenTools -import QGroundControl.Controllers -import QGroundControl.FactSystem import QGroundControl.FactControls Item { From 3d86b19ddf06881cf3f5d6a53db3dec51ea723f9 Mon Sep 17 00:00:00 2001 From: Niki-dev12 Date: Wed, 13 Aug 2025 09:21:23 +0200 Subject: [PATCH 03/11] fix in Vehicle.cc and Vehicle.h adding missing function --- src/Vehicle/Vehicle.cc | 30 ++++++++++++++++++++++++++++++ src/Vehicle/Vehicle.h | 2 ++ 2 files changed, 32 insertions(+) diff --git a/src/Vehicle/Vehicle.cc b/src/Vehicle/Vehicle.cc index 842f53fd2ca3..0ab2a4f9f6c9 100644 --- a/src/Vehicle/Vehicle.cc +++ b/src/Vehicle/Vehicle.cc @@ -406,6 +406,36 @@ void Vehicle::deleteGimbalController() } } +void Vehicle::sendGimbalAbsolutePosition(float pitch_rate_deg_s, float yaw_rate_deg_s) +{ + auto sharedLink = vehicleLinkManager()->primaryLink().lock(); + if (!sharedLink) { + qCDebug(VehicleLog) << "sendGimbalAbsolutePosition: primary link gone!"; + return; + } + + mavlink_message_t msg; + mavlink_msg_command_long_pack_chan( + MAVLinkProtocol::instance()->getSystemId(), + MAVLinkProtocol::getComponentId(), + sharedLink->mavlinkChannel(), + &msg, + id(), + MAV_COMP_ID_AUTOPILOT1, + MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW, + 0, + NAN, + NAN, + pitch_rate_deg_s, + yaw_rate_deg_s, + 0, + NAN, + 0 + ); + + sendMessageOnLinkThreadSafe(sharedLink.get(), msg); +} + void Vehicle::_offlineFirmwareTypeSettingChanged(QVariant varFirmwareType) { _firmwareType = static_cast(varFirmwareType.toInt()); diff --git a/src/Vehicle/Vehicle.h b/src/Vehicle/Vehicle.h index d15f2cf6c87f..1424bdf9cdca 100644 --- a/src/Vehicle/Vehicle.h +++ b/src/Vehicle/Vehicle.h @@ -527,6 +527,8 @@ class Vehicle : public VehicleFactGroup /// @param sendMultiple Send multiple time to guarantee Vehicle reception void requestDataStream(MAV_DATA_STREAM stream, uint16_t rate, bool sendMultiple = true); + void sendGimbalAbsolutePosition(float pitch_rate_deg_s, float yaw_rate_deg_s); + // The follow method are used to turn on/off the tracking of settings updates for firmware/vehicle type on offline vehicles. void trackFirmwareVehicleTypeChanges(void); void stopTrackingFirmwareVehicleTypeChanges(void); From 5e8380db14bbf2b6cfc4e7a897856a50e33363bc Mon Sep 17 00:00:00 2001 From: Niki-dev12 Date: Tue, 19 Aug 2025 07:44:53 +0200 Subject: [PATCH 04/11] Add gimbal max speed feature --- src/Gimbal/GimbalController.cc | 55 ++++++++++++++++++++++++++++++++++ src/Gimbal/GimbalController.h | 4 +++ src/Joystick/Joystick.cc | 24 ++++++++------- src/Joystick/Joystick.h | 2 ++ src/Vehicle/Vehicle.h | 2 -- 5 files changed, 74 insertions(+), 13 deletions(-) diff --git a/src/Gimbal/GimbalController.cc b/src/Gimbal/GimbalController.cc index 7cb90402158f..22596a2241b8 100644 --- a/src/Gimbal/GimbalController.cc +++ b/src/Gimbal/GimbalController.cc @@ -15,6 +15,7 @@ #include "QmlObjectListModel.h" #include "SettingsManager.h" #include "Vehicle.h" +#include // for NAN QGC_LOGGING_CATEGORY(GimbalControllerLog, "qgc.gimbal.gimbalcontroller") @@ -590,6 +591,60 @@ void GimbalController::sendRate() } } +void GimbalController::sendGimbalRate(float pitch_rate_deg_s, float yaw_rate_deg_s) +{ + if (!_tryGetGimbalControl()) { + return; + } + + uint32_t flags = GIMBAL_MANAGER_FLAGS_ROLL_LOCK | GIMBAL_MANAGER_FLAGS_PITCH_LOCK; + if (_activeGimbal && _activeGimbal->yawLock()) { + flags |= GIMBAL_MANAGER_FLAGS_YAW_LOCK; + } + + _sendGimbalRateCommandLong(pitch_rate_deg_s, yaw_rate_deg_s, flags); + + if (pitch_rate_deg_s == 0.f && yaw_rate_deg_s == 0.f) { + _rateSenderTimer.stop(); + } else { + _rateSenderTimer.start(); + } +} + +/// Build and send MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW with rate fields, +/// using Vehicle::sendMessageOnLinkThreadSafe +void GimbalController::_sendGimbalRateCommandLong(float pitch_rate_deg_s, + float yaw_rate_deg_s, + uint32_t flags) +{ + auto sharedLink = _vehicle->vehicleLinkManager()->primaryLink().lock(); + if (!sharedLink) { + qCDebug(GimbalControllerLog) << "_sendGimbalRateCommandLong: primary link gone!"; + return; + } + + mavlink_message_t msg; + mavlink_msg_command_long_pack_chan( + MAVLinkProtocol::instance()->getSystemId(), + MAVLinkProtocol::getComponentId(), + sharedLink->mavlinkChannel(), + &msg, + _vehicle->id(), + _activeGimbal->managerCompid()->rawValue().toUInt(), + MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW, + 0, + NAN, + NAN, + pitch_rate_deg_s, + yaw_rate_deg_s, + flags, + 0, + _activeGimbal->deviceId()->rawValue().toUInt() + ); + + _vehicle->sendMessageOnLinkThreadSafe(sharedLink.get(), msg); +} + void GimbalController::_rateSenderTimeout() { // Send rate again to avoid timeout on autopilot side. diff --git a/src/Gimbal/GimbalController.h b/src/Gimbal/GimbalController.h index 4a2601ed587f..068afbb11766 100644 --- a/src/Gimbal/GimbalController.h +++ b/src/Gimbal/GimbalController.h @@ -49,6 +49,8 @@ class GimbalController : public QObject Q_INVOKABLE void releaseGimbalControl(); Q_INVOKABLE void sendRate(); + Q_INVOKABLE void sendGimbalRate(float pitch_rate_deg_s, float yaw_rate_deg_s); + signals: void activeGimbalChanged(); void showAcquireGimbalControlPopup(); // This triggers a popup in QML asking the user for aproval to take control @@ -104,6 +106,8 @@ private slots: bool _tryGetGimbalControl(); bool _yawInVehicleFrame(uint32_t flags); + void _sendGimbalRateCommandLong(float pitch_rate_deg_s, float yaw_rate_deg_s, uint32_t flags); + QTimer _rateSenderTimer; Vehicle *_vehicle = nullptr; Gimbal *_activeGimbal = nullptr; diff --git a/src/Joystick/Joystick.cc b/src/Joystick/Joystick.cc index bf814f966a03..34820cb0fbeb 100644 --- a/src/Joystick/Joystick.cc +++ b/src/Joystick/Joystick.cc @@ -668,8 +668,6 @@ void Joystick::_handleAxis() if (_axisCount > 5 && _gimbalAxisEnabled) { int pitchAxisIndex = 5; float gimbalPitchNorm = _adjustRange(_rgAxisValues[pitchAxisIndex], _rgCalibration[pitchAxisIndex], _deadband); - // float gimbalPitchDeg = gimbalPitchNorm * 160.0f - 80.0f; - // float gimbalPitchDeg = gimbalPitchNorm * (2.0f * gimbalPitchMax) - gimbalPitchMax; float gimbalPitchDeg = gimbalPitchNorm * (2.0f * static_cast(_gimbalMaxSpeed)) - static_cast(_gimbalMaxSpeed); gimbalPitchDeg=gimbalPitchDeg-5; @@ -678,16 +676,12 @@ void Joystick::_handleAxis() int yawAxisIndex = 4; float gimbalYawNorm = _adjustRange(_rgAxisValues[yawAxisIndex], _rgCalibration[yawAxisIndex], _deadband); - // float gimbalYawDeg = gimbalYawNorm * 160.0f - 80.0f; float gimbalYawDeg = gimbalYawNorm * (2.0f * static_cast(_gimbalMaxSpeed)) - static_cast(_gimbalMaxSpeed); gimbalYawDeg=gimbalYawDeg-4; float gimbalYawDeadzone = static_cast(_rgCalibration[4].deadband); float gimbalYawOut = applyDeadzone(gimbalYawDeg, gimbalYawDeadzone); - static int zeroPitchCount = 0; - static int zeroYawCount = 0; - if (std::abs(gimbalPitchOut) == 0) { zeroPitchCount++; } else { @@ -700,13 +694,21 @@ void Joystick::_handleAxis() zeroYawCount = 0; } - if (zeroPitchCount >= 3 && zeroYawCount >= 3) { - - }else{ - _activeVehicle->sendGimbalAbsolutePosition(gimbalPitchOut, gimbalYawOut); - // qDebug() << gimbalYawOut << gimbalPitchOut; + if (!(zeroPitchCount >= 3 && zeroYawCount >= 3)) { + if (_activeVehicle) { + if (auto* gc = _activeVehicle->gimbalController()) { + QMetaObject::invokeMethod( + gc, + "sendGimbalRate", + Qt::QueuedConnection, + Q_ARG(float, gimbalPitchOut), + Q_ARG(float, gimbalYawOut) + ); + } + } } } + if (_accumulator) { static float throttle_accu = 0.f; throttle_accu += (throttle * (40 / 1000.f)); // for throttle to change from min to max it will take 1000ms (40ms is a loop time) diff --git a/src/Joystick/Joystick.h b/src/Joystick/Joystick.h index fdb5e7313b90..71d591dc717e 100644 --- a/src/Joystick/Joystick.h +++ b/src/Joystick/Joystick.h @@ -389,4 +389,6 @@ private slots: bool _gimbalAxisEnabled = true; int _gimbalMaxSpeed = 80; // Default max speed + int zeroPitchCount = 0; + int zeroYawCount = 0; }; diff --git a/src/Vehicle/Vehicle.h b/src/Vehicle/Vehicle.h index 1424bdf9cdca..d15f2cf6c87f 100644 --- a/src/Vehicle/Vehicle.h +++ b/src/Vehicle/Vehicle.h @@ -527,8 +527,6 @@ class Vehicle : public VehicleFactGroup /// @param sendMultiple Send multiple time to guarantee Vehicle reception void requestDataStream(MAV_DATA_STREAM stream, uint16_t rate, bool sendMultiple = true); - void sendGimbalAbsolutePosition(float pitch_rate_deg_s, float yaw_rate_deg_s); - // The follow method are used to turn on/off the tracking of settings updates for firmware/vehicle type on offline vehicles. void trackFirmwareVehicleTypeChanges(void); void stopTrackingFirmwareVehicleTypeChanges(void); From 62656dfd074593205d3d762f6f1a7f9240d69075 Mon Sep 17 00:00:00 2001 From: Niki-dev12 Date: Tue, 19 Aug 2025 08:21:43 +0200 Subject: [PATCH 05/11] removing vehicle dependencies --- src/Joystick/Joystick.cc | 13 ++++++++++++- src/Vehicle/Vehicle.cc | 30 ------------------------------ 2 files changed, 12 insertions(+), 31 deletions(-) diff --git a/src/Joystick/Joystick.cc b/src/Joystick/Joystick.cc index 34820cb0fbeb..5cda499c59f6 100644 --- a/src/Joystick/Joystick.cc +++ b/src/Joystick/Joystick.cc @@ -616,7 +616,18 @@ void Joystick::setGimbalAxisEnabled(bool enabled) _gimbalAxisEnabled = enabled; emit gimbalAxisEnabledChanged(enabled); _saveSettings(); - _activeVehicle->sendGimbalAbsolutePosition(0, 0); + // Send a zero-rate command once when the state flips + if (_activeVehicle) { + if (auto* gc = _activeVehicle->gimbalController()) { + QMetaObject::invokeMethod( + gc, + "sendGimbalRate", + Qt::QueuedConnection, + Q_ARG(float, 0.0f), + Q_ARG(float, 0.0f) + ); + } + } } } diff --git a/src/Vehicle/Vehicle.cc b/src/Vehicle/Vehicle.cc index 0ab2a4f9f6c9..842f53fd2ca3 100644 --- a/src/Vehicle/Vehicle.cc +++ b/src/Vehicle/Vehicle.cc @@ -406,36 +406,6 @@ void Vehicle::deleteGimbalController() } } -void Vehicle::sendGimbalAbsolutePosition(float pitch_rate_deg_s, float yaw_rate_deg_s) -{ - auto sharedLink = vehicleLinkManager()->primaryLink().lock(); - if (!sharedLink) { - qCDebug(VehicleLog) << "sendGimbalAbsolutePosition: primary link gone!"; - return; - } - - mavlink_message_t msg; - mavlink_msg_command_long_pack_chan( - MAVLinkProtocol::instance()->getSystemId(), - MAVLinkProtocol::getComponentId(), - sharedLink->mavlinkChannel(), - &msg, - id(), - MAV_COMP_ID_AUTOPILOT1, - MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW, - 0, - NAN, - NAN, - pitch_rate_deg_s, - yaw_rate_deg_s, - 0, - NAN, - 0 - ); - - sendMessageOnLinkThreadSafe(sharedLink.get(), msg); -} - void Vehicle::_offlineFirmwareTypeSettingChanged(QVariant varFirmwareType) { _firmwareType = static_cast(varFirmwareType.toInt()); From 9431548b94cbe90d5244dfecb2da40e8d8b2e0fa Mon Sep 17 00:00:00 2001 From: Niki-dev12 Date: Tue, 9 Sep 2025 07:31:52 +0200 Subject: [PATCH 06/11] change to attitude gimbal message --- src/Gimbal/GimbalController.cc | 38 +++++++++++++++------------------- src/Gimbal/GimbalController.h | 2 +- 2 files changed, 18 insertions(+), 22 deletions(-) diff --git a/src/Gimbal/GimbalController.cc b/src/Gimbal/GimbalController.cc index 22596a2241b8..cb5933336c67 100644 --- a/src/Gimbal/GimbalController.cc +++ b/src/Gimbal/GimbalController.cc @@ -17,6 +17,8 @@ #include "Vehicle.h" #include // for NAN +#define M_DEG_TO_RAD_F 0.0174532925f + QGC_LOGGING_CATEGORY(GimbalControllerLog, "qgc.gimbal.gimbalcontroller") GimbalController::GimbalController(Vehicle *vehicle) @@ -597,12 +599,7 @@ void GimbalController::sendGimbalRate(float pitch_rate_deg_s, float yaw_rate_deg return; } - uint32_t flags = GIMBAL_MANAGER_FLAGS_ROLL_LOCK | GIMBAL_MANAGER_FLAGS_PITCH_LOCK; - if (_activeGimbal && _activeGimbal->yawLock()) { - flags |= GIMBAL_MANAGER_FLAGS_YAW_LOCK; - } - - _sendGimbalRateCommandLong(pitch_rate_deg_s, yaw_rate_deg_s, flags); + _sendGimbalRateCommandLong(pitch_rate_deg_s, yaw_rate_deg_s); if (pitch_rate_deg_s == 0.f && yaw_rate_deg_s == 0.f) { _rateSenderTimer.stop(); @@ -611,11 +608,8 @@ void GimbalController::sendGimbalRate(float pitch_rate_deg_s, float yaw_rate_deg } } -/// Build and send MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW with rate fields, -/// using Vehicle::sendMessageOnLinkThreadSafe void GimbalController::_sendGimbalRateCommandLong(float pitch_rate_deg_s, - float yaw_rate_deg_s, - uint32_t flags) + float yaw_rate_deg_s) { auto sharedLink = _vehicle->vehicleLinkManager()->primaryLink().lock(); if (!sharedLink) { @@ -623,23 +617,25 @@ void GimbalController::_sendGimbalRateCommandLong(float pitch_rate_deg_s, return; } + uint32_t flags = 0; mavlink_message_t msg; - mavlink_msg_command_long_pack_chan( + + // q is ignored when sending rates + const float qnan[4] = { NAN, NAN, NAN, NAN }; + + mavlink_msg_gimbal_manager_set_attitude_pack_chan( MAVLinkProtocol::instance()->getSystemId(), MAVLinkProtocol::getComponentId(), sharedLink->mavlinkChannel(), &msg, - _vehicle->id(), - _activeGimbal->managerCompid()->rawValue().toUInt(), - MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW, - 0, + _vehicle->id(), // target_system + static_cast(_activeGimbal->managerCompid()->rawValue().toUInt()), // target_component + flags, + static_cast(_activeGimbal->deviceId()->rawValue().toUInt()), // gimbal_device_id + qnan, // quaternion (ignored) NAN, - NAN, - pitch_rate_deg_s, - yaw_rate_deg_s, - flags, - 0, - _activeGimbal->deviceId()->rawValue().toUInt() + qDegreesToRadians(pitch_rate_deg_s), + qDegreesToRadians(yaw_rate_deg_s) ); _vehicle->sendMessageOnLinkThreadSafe(sharedLink.get(), msg); diff --git a/src/Gimbal/GimbalController.h b/src/Gimbal/GimbalController.h index 068afbb11766..87dfb4a693b7 100644 --- a/src/Gimbal/GimbalController.h +++ b/src/Gimbal/GimbalController.h @@ -106,7 +106,7 @@ private slots: bool _tryGetGimbalControl(); bool _yawInVehicleFrame(uint32_t flags); - void _sendGimbalRateCommandLong(float pitch_rate_deg_s, float yaw_rate_deg_s, uint32_t flags); + void _sendGimbalRateCommandLong(float pitch_rate_deg_s, float yaw_rate_deg_s); QTimer _rateSenderTimer; Vehicle *_vehicle = nullptr; From 6ce42ad5ba2e34c705fb1c8a288fbf6f133577cf Mon Sep 17 00:00:00 2001 From: Niki-dev12 Date: Tue, 9 Sep 2025 12:07:38 +0200 Subject: [PATCH 07/11] fix MacOs --- src/Joystick/JoystickAndroid.cc | 4 ++-- src/Joystick/JoystickAndroid.h | 31 +++++++++++++++++++++---------- 2 files changed, 23 insertions(+), 12 deletions(-) diff --git a/src/Joystick/JoystickAndroid.cc b/src/Joystick/JoystickAndroid.cc index aaa58b882447..15e8f13769d5 100644 --- a/src/Joystick/JoystickAndroid.cc +++ b/src/Joystick/JoystickAndroid.cc @@ -24,8 +24,8 @@ int JoystickAndroid::AXIS_HAT_X = 0; int JoystickAndroid::AXIS_HAT_Y = 0; QMutex JoystickAndroid::_mutex; -JoystickAndroid::JoystickAndroid(const QString &name, int axisCount, int buttonCount, int id, QObject *parent) - : Joystick(name, axisCount, buttonCount, 0, parent) +JoystickAndroid::JoystickAndroid(const QString& name, int axisCount, int buttonCount, int hatCount, int id, QObject* parent) + : Joystick(name, axisCount, buttonCount, hatCount, parent) , deviceId(id) { btnCode.resize(_buttonCount); diff --git a/src/Joystick/JoystickAndroid.h b/src/Joystick/JoystickAndroid.h index 8f1b7acb218f..40b3a6177923 100644 --- a/src/Joystick/JoystickAndroid.h +++ b/src/Joystick/JoystickAndroid.h @@ -10,17 +10,27 @@ #pragma once #include +#include #include #include "Joystick.h" Q_DECLARE_LOGGING_CATEGORY(JoystickAndroidLog) -class JoystickAndroid : public Joystick, public QtAndroidPrivate::GenericMotionEventListener, public QtAndroidPrivate::KeyEventListener +class JoystickAndroid + : public Joystick + , public QtAndroidPrivate::GenericMotionEventListener + , public QtAndroidPrivate::KeyEventListener { public: - JoystickAndroid(const QString &name, int axisCount, int buttonCount, int id, QObject *parent = nullptr); - ~JoystickAndroid(); + // Note: hatCount added to match .cc and Joystick(base) ctor + JoystickAndroid(const QString &name, + int axisCount, + int buttonCount, + int hatCount, + int id, + QObject *parent = nullptr); + ~JoystickAndroid() override; static bool init(); static void setNativeMethods(); @@ -32,20 +42,21 @@ class JoystickAndroid : public Joystick, public QtAndroidPrivate::GenericMotionE bool _update() final { return true; } bool _getButton(int i) const final { return btnValue[i]; } - int _getAxis(int i) const final { return axisValue[i]; } + int _getAxis(int i) const final { return axisValue[i]; } bool _getHat(int hat, int i) const final; - int _getAndroidHatAxis(int axisHatCode) const; + int _getAndroidHatAxis(int axisHatCode) const; - bool handleKeyEvent(jobject event); - bool handleGenericMotionEvent(jobject event); + // Explicitly mark as overrides of the QtAndroidPrivate listener interfaces + bool handleKeyEvent(jobject event) override; + bool handleGenericMotionEvent(jobject event) override; int deviceId = 0; - QList btnCode; - QList axisCode; + QList btnCode; + QList axisCode; QList btnValue; - QList axisValue; + QList axisValue; static constexpr int _androidBtnListCount = 31; static QList _androidBtnList; From 7e7b0735de8a0916e9755681448da53e4e04c414 Mon Sep 17 00:00:00 2001 From: Niki-dev12 Date: Tue, 9 Sep 2025 13:44:55 +0200 Subject: [PATCH 08/11] fix android joystick error --- src/Joystick/JoystickAndroid.h | 33 +++++++++++---------------------- 1 file changed, 11 insertions(+), 22 deletions(-) diff --git a/src/Joystick/JoystickAndroid.h b/src/Joystick/JoystickAndroid.h index 40b3a6177923..235002a755d4 100644 --- a/src/Joystick/JoystickAndroid.h +++ b/src/Joystick/JoystickAndroid.h @@ -10,27 +10,17 @@ #pragma once #include -#include #include #include "Joystick.h" Q_DECLARE_LOGGING_CATEGORY(JoystickAndroidLog) -class JoystickAndroid - : public Joystick - , public QtAndroidPrivate::GenericMotionEventListener - , public QtAndroidPrivate::KeyEventListener +class JoystickAndroid : public Joystick, public QtAndroidPrivate::GenericMotionEventListener, public QtAndroidPrivate::KeyEventListener { public: - // Note: hatCount added to match .cc and Joystick(base) ctor - JoystickAndroid(const QString &name, - int axisCount, - int buttonCount, - int hatCount, - int id, - QObject *parent = nullptr); - ~JoystickAndroid() override; + JoystickAndroid(const QString &name, int axisCount, int buttonCount, int id, QObject *parent = nullptr); + ~JoystickAndroid(); static bool init(); static void setNativeMethods(); @@ -42,25 +32,24 @@ class JoystickAndroid bool _update() final { return true; } bool _getButton(int i) const final { return btnValue[i]; } - int _getAxis(int i) const final { return axisValue[i]; } + int _getAxis(int i) const final { return axisValue[i]; } bool _getHat(int hat, int i) const final; - int _getAndroidHatAxis(int axisHatCode) const; + int _getAndroidHatAxis(int axisHatCode) const; - // Explicitly mark as overrides of the QtAndroidPrivate listener interfaces - bool handleKeyEvent(jobject event) override; - bool handleGenericMotionEvent(jobject event) override; + bool handleKeyEvent(jobject event); + bool handleGenericMotionEvent(jobject event); int deviceId = 0; - QList btnCode; - QList axisCode; + QList btnCode; + QList axisCode; QList btnValue; - QList axisValue; + QList axisValue; static constexpr int _androidBtnListCount = 31; static QList _androidBtnList; static int ACTION_DOWN, ACTION_UP, AXIS_HAT_X, AXIS_HAT_Y; static QMutex _mutex; -}; +}; \ No newline at end of file From 32479744f410fcd7672e6f268b8f202509968bfe Mon Sep 17 00:00:00 2001 From: Niki-dev12 Date: Tue, 9 Sep 2025 13:56:47 +0200 Subject: [PATCH 09/11] fix android joystick error --- src/Joystick/JoystickAndroid.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Joystick/JoystickAndroid.cc b/src/Joystick/JoystickAndroid.cc index 15e8f13769d5..06ece31e3d9a 100644 --- a/src/Joystick/JoystickAndroid.cc +++ b/src/Joystick/JoystickAndroid.cc @@ -24,8 +24,8 @@ int JoystickAndroid::AXIS_HAT_X = 0; int JoystickAndroid::AXIS_HAT_Y = 0; QMutex JoystickAndroid::_mutex; -JoystickAndroid::JoystickAndroid(const QString& name, int axisCount, int buttonCount, int hatCount, int id, QObject* parent) - : Joystick(name, axisCount, buttonCount, hatCount, parent) +JoystickAndroid::JoystickAndroid(const QString &name, int axisCount, int buttonCount, int id, QObject *parent) + : Joystick(name, axisCount, buttonCount, 0, parent) , deviceId(id) { btnCode.resize(_buttonCount); @@ -298,4 +298,4 @@ void JoystickAndroid::setNativeMethods() } (void) AndroidInterface::cleanJavaException(); -} +} \ No newline at end of file From 4c69fb847184b0068086d136564589306aa999fd Mon Sep 17 00:00:00 2001 From: Niki-dev12 Date: Tue, 9 Sep 2025 15:17:11 +0200 Subject: [PATCH 10/11] fix MacOs error --- CMakeCache.txt | 737 +++++++++++++++++++++++++++++++++++++++++ cpm-package-lock.cmake | 3 + 2 files changed, 740 insertions(+) create mode 100644 CMakeCache.txt create mode 100644 cpm-package-lock.cmake diff --git a/CMakeCache.txt b/CMakeCache.txt new file mode 100644 index 000000000000..18ea520b92d0 --- /dev/null +++ b/CMakeCache.txt @@ -0,0 +1,737 @@ +# This is the CMakeCache file. +# For build in directory: /mnt/qgroundcontrol/qgroundcontrol +# It was generated by CMake: /opt/cmake/bin/cmake +# You can edit this file to change values found and used by cmake. +# If you do not want to change any of the values, simply exit the editor. +# If you do want to change a value, simply edit, save, and exit the editor. +# The syntax for the file is as follows: +# KEY:TYPE=VALUE +# KEY is the name of a variable in the cache. +# TYPE is a hint to GUIs for the type of VALUE, DO NOT EDIT TYPE!. +# VALUE is the current value for the KEY. + +######################## +# EXTERNAL cache entries +######################## + +//Build using shared libraries +BUILD_SHARED_LIBS:BOOL=OFF + +//Path to a program. +CMAKE_ADDR2LINE:FILEPATH=/usr/bin/addr2line + +//Path to a program. +CMAKE_AR:FILEPATH=/usr/bin/ar + +//Build type +CMAKE_BUILD_TYPE:STRING=Release + +//Enable/Disable color output during build. +CMAKE_COLOR_MAKEFILE:BOOL=ON + +//Configuration types +CMAKE_CONFIGURATION_TYPES:STRING=Debug;Release + +//CXX compiler +CMAKE_CXX_COMPILER:FILEPATH=/usr/lib/ccache/c++ + +//A wrapper around 'ar' adding the appropriate '--plugin' option +// for the GCC compiler +CMAKE_CXX_COMPILER_AR:FILEPATH=/usr/bin/gcc-ar-9 + +//CXX compiler launcher +CMAKE_CXX_COMPILER_LAUNCHER:STRING=/usr/bin/ccache + +//A wrapper around 'ranlib' adding the appropriate '--plugin' option +// for the GCC compiler +CMAKE_CXX_COMPILER_RANLIB:FILEPATH=/usr/bin/gcc-ranlib-9 + +//Flags used by the CXX compiler during all build types. +CMAKE_CXX_FLAGS:STRING= + +//Flags used by the CXX compiler during DEBUG builds. +CMAKE_CXX_FLAGS_DEBUG:STRING=-g + +//Flags used by the CXX compiler during MINSIZEREL builds. +CMAKE_CXX_FLAGS_MINSIZEREL:STRING=-Os -DNDEBUG + +//Flags used by the CXX compiler during RELEASE builds. +CMAKE_CXX_FLAGS_RELEASE:STRING=-O3 -DNDEBUG + +//Flags used by the CXX compiler during RELWITHDEBINFO builds. +CMAKE_CXX_FLAGS_RELWITHDEBINFO:STRING=-O2 -g -DNDEBUG + +//C compiler +CMAKE_C_COMPILER:FILEPATH=/usr/lib/ccache/cc + +//A wrapper around 'ar' adding the appropriate '--plugin' option +// for the GCC compiler +CMAKE_C_COMPILER_AR:FILEPATH=/usr/bin/gcc-ar-9 + +//C compiler launcher +CMAKE_C_COMPILER_LAUNCHER:STRING=/usr/bin/ccache + +//A wrapper around 'ranlib' adding the appropriate '--plugin' option +// for the GCC compiler +CMAKE_C_COMPILER_RANLIB:FILEPATH=/usr/bin/gcc-ranlib-9 + +//Flags used by the C compiler during all build types. +CMAKE_C_FLAGS:STRING= + +//Flags used by the C compiler during DEBUG builds. +CMAKE_C_FLAGS_DEBUG:STRING=-g + +//Flags used by the C compiler during MINSIZEREL builds. +CMAKE_C_FLAGS_MINSIZEREL:STRING=-Os -DNDEBUG + +//Flags used by the C compiler during RELEASE builds. +CMAKE_C_FLAGS_RELEASE:STRING=-O3 -DNDEBUG + +//Flags used by the C compiler during RELWITHDEBINFO builds. +CMAKE_C_FLAGS_RELWITHDEBINFO:STRING=-O2 -g -DNDEBUG + +//Path to a program. +CMAKE_DLLTOOL:FILEPATH=CMAKE_DLLTOOL-NOTFOUND + +//Flags used by the linker during all build types. +CMAKE_EXE_LINKER_FLAGS:STRING= + +//Flags used by the linker during DEBUG builds. +CMAKE_EXE_LINKER_FLAGS_DEBUG:STRING= + +//Flags used by the linker during MINSIZEREL builds. +CMAKE_EXE_LINKER_FLAGS_MINSIZEREL:STRING= + +//Flags used by the linker during RELEASE builds. +CMAKE_EXE_LINKER_FLAGS_RELEASE:STRING= + +//Flags used by the linker during RELWITHDEBINFO builds. +CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO:STRING= + +//Enable/Disable output of compile commands during generation. +CMAKE_EXPORT_COMPILE_COMMANDS:BOOL= + +//Value Computed by CMake. +CMAKE_FIND_PACKAGE_REDIRECTS_DIR:STATIC=/mnt/qgroundcontrol/qgroundcontrol/CMakeFiles/pkgRedirects + +//User executables (bin) +CMAKE_INSTALL_BINDIR:PATH=bin + +//Read-only architecture-independent data (DATAROOTDIR) +CMAKE_INSTALL_DATADIR:PATH= + +//Read-only architecture-independent data root (share) +CMAKE_INSTALL_DATAROOTDIR:PATH=share + +//Documentation root (DATAROOTDIR/doc/PROJECT_NAME) +CMAKE_INSTALL_DOCDIR:PATH= + +//C header files (include) +CMAKE_INSTALL_INCLUDEDIR:PATH=include + +//Info documentation (DATAROOTDIR/info) +CMAKE_INSTALL_INFODIR:PATH= + +//Object code libraries (lib) +CMAKE_INSTALL_LIBDIR:PATH=lib + +//Program executables (libexec) +CMAKE_INSTALL_LIBEXECDIR:PATH=libexec + +//Locale-dependent data (DATAROOTDIR/locale) +CMAKE_INSTALL_LOCALEDIR:PATH= + +//Modifiable single-machine data (var) +CMAKE_INSTALL_LOCALSTATEDIR:PATH=var + +//Man documentation (DATAROOTDIR/man) +CMAKE_INSTALL_MANDIR:PATH= + +//C header files for non-gcc (/usr/include) +CMAKE_INSTALL_OLDINCLUDEDIR:PATH=/usr/include + +//Install path prefix for AppImage +CMAKE_INSTALL_PREFIX:PATH=/mnt/qgroundcontrol/qgroundcontrol/AppDir/usr + +//Run-time variable data (LOCALSTATEDIR/run) +CMAKE_INSTALL_RUNSTATEDIR:PATH= + +//System admin executables (sbin) +CMAKE_INSTALL_SBINDIR:PATH=sbin + +//Modifiable architecture-independent data (com) +CMAKE_INSTALL_SHAREDSTATEDIR:PATH=com + +//Read-only single-machine data (etc) +CMAKE_INSTALL_SYSCONFDIR:PATH=etc + +//Path to a program. +CMAKE_LINKER:FILEPATH=/usr/bin/ld + +//Path to a program. +CMAKE_MAKE_PROGRAM:FILEPATH=/usr/bin/make + +//Flags used by the linker during the creation of modules during +// all build types. +CMAKE_MODULE_LINKER_FLAGS:STRING= + +//Flags used by the linker during the creation of modules during +// DEBUG builds. +CMAKE_MODULE_LINKER_FLAGS_DEBUG:STRING= + +//Flags used by the linker during the creation of modules during +// MINSIZEREL builds. +CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL:STRING= + +//Flags used by the linker during the creation of modules during +// RELEASE builds. +CMAKE_MODULE_LINKER_FLAGS_RELEASE:STRING= + +//Flags used by the linker during the creation of modules during +// RELWITHDEBINFO builds. +CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO:STRING= + +//Path to a program. +CMAKE_NM:FILEPATH=/usr/bin/nm + +//Path to a program. +CMAKE_OBJCOPY:FILEPATH=/usr/bin/objcopy + +//Path to a program. +CMAKE_OBJDUMP:FILEPATH=/usr/bin/objdump + +//Value Computed by CMake +CMAKE_PROJECT_DESCRIPTION:STATIC=Open Source Ground Control App + +//Value Computed by CMake +CMAKE_PROJECT_HOMEPAGE_URL:STATIC=https://qgroundcontrol.com + +//Value Computed by CMake +CMAKE_PROJECT_NAME:STATIC=QGroundControl + +//Value Computed by CMake +CMAKE_PROJECT_VERSION:STATIC=5.0.3 + +//Value Computed by CMake +CMAKE_PROJECT_VERSION_MAJOR:STATIC=5 + +//Value Computed by CMake +CMAKE_PROJECT_VERSION_MINOR:STATIC=0 + +//Value Computed by CMake +CMAKE_PROJECT_VERSION_PATCH:STATIC=3 + +//Value Computed by CMake +CMAKE_PROJECT_VERSION_TWEAK:STATIC= + +//Path to a program. +CMAKE_RANLIB:FILEPATH=/usr/bin/ranlib + +//Path to a program. +CMAKE_READELF:FILEPATH=/usr/bin/readelf + +//Flags used by the linker during the creation of shared libraries +// during all build types. +CMAKE_SHARED_LINKER_FLAGS:STRING= + +//Flags used by the linker during the creation of shared libraries +// during DEBUG builds. +CMAKE_SHARED_LINKER_FLAGS_DEBUG:STRING= + +//Flags used by the linker during the creation of shared libraries +// during MINSIZEREL builds. +CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL:STRING= + +//Flags used by the linker during the creation of shared libraries +// during RELEASE builds. +CMAKE_SHARED_LINKER_FLAGS_RELEASE:STRING= + +//Flags used by the linker during the creation of shared libraries +// during RELWITHDEBINFO builds. +CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO:STRING= + +//If set, runtime paths are not added when installing shared libraries, +// but are added when building. +CMAKE_SKIP_INSTALL_RPATH:BOOL=NO + +//If set, runtime paths are not added when using shared libraries. +CMAKE_SKIP_RPATH:BOOL=NO + +//Flags used by the linker during the creation of static libraries +// during all build types. +CMAKE_STATIC_LINKER_FLAGS:STRING= + +//Flags used by the linker during the creation of static libraries +// during DEBUG builds. +CMAKE_STATIC_LINKER_FLAGS_DEBUG:STRING= + +//Flags used by the linker during the creation of static libraries +// during MINSIZEREL builds. +CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL:STRING= + +//Flags used by the linker during the creation of static libraries +// during RELEASE builds. +CMAKE_STATIC_LINKER_FLAGS_RELEASE:STRING= + +//Flags used by the linker during the creation of static libraries +// during RELWITHDEBINFO builds. +CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO:STRING= + +//Path to a program. +CMAKE_STRIP:FILEPATH=/usr/bin/strip + +//Path to a program. +CMAKE_TAPI:FILEPATH=CMAKE_TAPI-NOTFOUND + +//If this value is on, makefiles will be generated without the +// .SILENT directive, and all commands will be echoed to the console +// during the make. This is useful for debugging only. With Visual +// Studio IDE projects all commands are done without /nologo. +CMAKE_VERBOSE_MAKEFILE:BOOL=FALSE + +//Don't create a package lock file in the binary path +CPM_DONT_CREATE_PACKAGE_LOCK:BOOL=OFF + +//Don't update the module path to allow using find_package +CPM_DONT_UPDATE_MODULE_PATH:BOOL=OFF + +//Always download dependencies from source +CPM_DOWNLOAD_ALL:BOOL=OFF + +//Add all packages added through CPM.cmake to the package lock +CPM_INCLUDE_ALL_IN_PACKAGE_LOCK:BOOL=OFF + +//Only use `find_package` to get dependencies +CPM_LOCAL_PACKAGES_ONLY:BOOL=OFF + +//Directory to download CPM dependencies +CPM_SOURCE_CACHE:PATH=/mnt/qgroundcontrol/qgroundcontrol/cpm_modules + +//Always try to use `find_package` to get dependencies +CPM_USE_LOCAL_PACKAGES:BOOL=OFF + +//Use additional directory of package name in cache on the most +// nested level. +CPM_USE_NAMED_CACHE_DIRECTORIES:BOOL=OFF + +//Directory under which to collect all populated content +FETCHCONTENT_BASE_DIR:PATH=/mnt/qgroundcontrol/qgroundcontrol/_deps + +//Disables all attempts to download or update content and assumes +// source dirs already exist +FETCHCONTENT_FULLY_DISCONNECTED:BOOL=OFF + +//Enables QUIET option for all content population +FETCHCONTENT_QUIET:BOOL=ON + +//Enables UPDATE_DISCONNECTED behavior for all content population +FETCHCONTENT_UPDATES_DISCONNECTED:BOOL=OFF + +//Git command line client +GIT_EXECUTABLE:FILEPATH=/usr/bin/git + +//Check submodules during build +GIT_SUBMODULE:BOOL=OFF + +//Disable AIRLink +QGC_AIRLINK_DISABLED:BOOL=ON + +//Android Package Name +QGC_ANDROID_PACKAGE_NAME:STRING=org.mavlink.qgroundcontrol + +//Android Package Path +QGC_ANDROID_PACKAGE_SOURCE_DIR:PATH=/mnt/qgroundcontrol/qgroundcontrol/android + +//AppImage Metadata Developer +QGC_APPIMAGE_APPDATA_DEVELOPER:STRING=qgroundcontrol + +//AppImage AppRun Path +QGC_APPIMAGE_APPRUN_PATH:FILEPATH=/mnt/qgroundcontrol/qgroundcontrol/deploy/linux/AppRun + +//AppImage Desktop Entry Path +QGC_APPIMAGE_DESKTOP_ENTRY_PATH:FILEPATH=/mnt/qgroundcontrol/qgroundcontrol/deploy/linux/org.mavlink.qgroundcontrol.desktop.in + +//AppImage Icon 256x256 Path +QGC_APPIMAGE_ICON_256_PATH:FILEPATH=/mnt/qgroundcontrol/qgroundcontrol/deploy/linux/QGroundControl_256.png + +//AppImage Icon SVG Path +QGC_APPIMAGE_ICON_SCALABLE_PATH:FILEPATH=/mnt/qgroundcontrol/qgroundcontrol/deploy/linux/QGroundControl.svg + +//AppImage Metadata Path +QGC_APPIMAGE_METADATA_PATH:FILEPATH=/mnt/qgroundcontrol/qgroundcontrol/deploy/linux/org.mavlink.qgroundcontrol.appdata.xml.in + +//Copyright +QGC_APP_COPYRIGHT:STRING=Copyright (c) 2025 QGroundControl. All rights reserved. + +//Description +QGC_APP_DESCRIPTION:STRING=Open Source Ground Control App + +//App Name +QGC_APP_NAME:STRING=QGroundControl + +//Path to a program. +QGC_CACHE_PROGRAM:FILEPATH=/usr/bin/ccache + +//Directory to Download CPM Dependencies, Overrides CPM_SOURCE_CACHE +// Env Variable +QGC_CPM_SOURCE_CACHE:PATH= + +//Build an AppImage after build +QGC_CREATE_APPIMAGE:BOOL=ON + +//Enable Using QGC Provided Custom GStreamer Packages +QGC_CUSTOM_GST_PACKAGE:BOOL=OFF + +//Disable APM Dialect +QGC_DISABLE_APM_MAVLINK:BOOL=OFF + +//Disable APM Plugin +QGC_DISABLE_APM_PLUGIN:BOOL=OFF + +//Disable APM Plugin Factory +QGC_DISABLE_APM_PLUGIN_FACTORY:BOOL=OFF + +//Disable PX4 Plugin +QGC_DISABLE_PX4_PLUGIN:BOOL=OFF + +//Disable PX4 Plugin Factory +QGC_DISABLE_PX4_PLUGIN_FACTORY:BOOL=OFF + +//Enable Bluetooth Links +QGC_ENABLE_BLUETOOTH:BOOL=ON + +//Enable GStreamer Video Backend +QGC_ENABLE_GST_VIDEOSTREAMING:BOOL=ON + +//Enable QtMultimedia Video Backend +QGC_ENABLE_QT_VIDEOSTREAMING:BOOL=OFF + +//Enable UVC Devices +QGC_ENABLE_UVC:BOOL=ON + +//MacOS Bundle ID +QGC_MACOS_BUNDLE_ID:STRING=org.mavlink.qgroundcontrol + +//MacOS Entitlements Path +QGC_MACOS_ENTITLEMENTS_PATH:FILEPATH=/mnt/qgroundcontrol/qgroundcontrol/deploy/macos/qgroundcontrol.entitlements + +//MacOS Icon Path +QGC_MACOS_ICON_PATH:FILEPATH=/mnt/qgroundcontrol/qgroundcontrol/deploy/macos/qgroundcontrol.icns + +//MacOS PList Path +QGC_MACOS_PLIST_PATH:FILEPATH=/mnt/qgroundcontrol/qgroundcontrol/deploy/macos/MacOSXBundleInfo.plist.in + +//Build MacOS Universal Build (arm64;x86_64) +QGC_MACOS_UNIVERSAL_BUILD:BOOL=ON + +//URL to MAVLink Git Repo +QGC_MAVLINK_GIT_REPO:STRING=https://github.com/mavlink/c_library_v2.git + +//Tag of MAVLink Git Repo +QGC_MAVLINK_GIT_TAG:STRING=19f9955598af9a9181064619bd2e3c04bd2d848a + +//Disable Serial Links +QGC_NO_SERIAL_LINK:BOOL=OFF + +//Domain +QGC_ORG_DOMAIN:STRING=qgroundcontrol.com + +//Org Name +QGC_ORG_NAME:STRING=QGroundControl + +//Package Name +QGC_PACKAGE_NAME:STRING=org.mavlink.qgroundcontrol + +//Android Min SDK Version +QGC_QT_ANDROID_MIN_SDK_VERSION:STRING=28 + +//Android Target SDK Version +QGC_QT_ANDROID_TARGET_SDK_VERSION:STRING=36 + +//Maximum Supported Qt Version +QGC_QT_MAXIMUM_VERSION:STRING=6.8.3 + +//Minimum Supported Qt Version +QGC_QT_MINIMUM_VERSION:STRING=6.8.3 + +//Settings Version +QGC_SETTINGS_VERSION:STRING=9 + +//Stable Build +QGC_STABLE_BUILD:BOOL=OFF + +//Use Build Caching +QGC_USE_CACHE:BOOL=ON + +//Enable UTM Adapter +QGC_UTM_ADAPTER:BOOL=OFF + +//Enable Viewer3D +QGC_VIEWER3D:BOOL=ON + +//Windows Icon Path +QGC_WINDOWS_ICON_PATH:FILEPATH=/mnt/qgroundcontrol/qgroundcontrol/deploy/windows/WindowsQGC.ico + +//Windows Install Header Path +QGC_WINDOWS_INSTALL_HEADER_PATH:FILEPATH=/mnt/qgroundcontrol/qgroundcontrol/deploy/windows/installheader.bmp + +//Windows Resource File Path +QGC_WINDOWS_RESOURCE_FILE_PATH:FILEPATH=/mnt/qgroundcontrol/qgroundcontrol/deploy/windows/QGroundControl.rc + +//Enable ZeroConf Compatibility +QGC_ZEROCONF_ENABLED:BOOL=OFF + +//Value Computed by CMake +QGroundControl_BINARY_DIR:STATIC=/mnt/qgroundcontrol/qgroundcontrol + +//Value Computed by CMake +QGroundControl_IS_TOP_LEVEL:STATIC=ON + +//Value Computed by CMake +QGroundControl_SOURCE_DIR:STATIC=/mnt/qgroundcontrol/qgroundcontrol + +//Extra QML Import Paths +QML_IMPORT_PATH:STRING=/mnt/qgroundcontrol/qgroundcontrol/qml + +//Forces Signing if Set to Release +QT_ANDROID_DEPLOYMENT_TYPE:STRING= + +//Enable Signing AAB +QT_ANDROID_SIGN_AAB:BOOL=OFF + +//Enable Signing APK +QT_ANDROID_SIGN_APK:BOOL=OFF + +//Print Used Search Paths When a Package is Not Found +QT_DEBUG_FIND_PACKAGE:BOOL=ON + +//Verbose Deployment +QT_ENABLE_VERBOSE_DEPLOYMENT:BOOL=OFF + +//https://doc.qt.io/qt-6/cmake-variable-qt-qml-generate-qmlls-ini.html +QT_QML_GENERATE_QMLLS_INI:BOOL=ON + +//Install path for QML +QT_QML_OUTPUT_DIRECTORY:PATH=/mnt/qgroundcontrol/qgroundcontrol/qml + +//Silence Missing Dependency Warnings +QT_SILENCE_MISSING_DEPENDENCY_TARGET_WARNING:BOOL=OFF + +//Use Target Android Build Dir +QT_USE_TARGET_ANDROID_BUILD_DIR:BOOL=OFF + +//The directory containing a CMake configuration file for Qt6. +Qt6_DIR:PATH=Qt6_DIR-NOTFOUND + + +######################## +# INTERNAL cache entries +######################## + +BUILD_TESTING:INTERNAL=OFF +//ADVANCED property for variable: CMAKE_ADDR2LINE +CMAKE_ADDR2LINE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_AR +CMAKE_AR-ADVANCED:INTERNAL=1 +//This is the directory where this CMakeCache.txt was created +CMAKE_CACHEFILE_DIR:INTERNAL=/mnt/qgroundcontrol/qgroundcontrol +//Major version of cmake used to create the current loaded cache +CMAKE_CACHE_MAJOR_VERSION:INTERNAL=3 +//Minor version of cmake used to create the current loaded cache +CMAKE_CACHE_MINOR_VERSION:INTERNAL=27 +//Patch version of cmake used to create the current loaded cache +CMAKE_CACHE_PATCH_VERSION:INTERNAL=1 +//ADVANCED property for variable: CMAKE_COLOR_MAKEFILE +CMAKE_COLOR_MAKEFILE-ADVANCED:INTERNAL=1 +//Path to CMake executable. +CMAKE_COMMAND:INTERNAL=/opt/cmake/bin/cmake +//Path to cpack program executable. +CMAKE_CPACK_COMMAND:INTERNAL=/opt/cmake/bin/cpack +//Path to ctest program executable. +CMAKE_CTEST_COMMAND:INTERNAL=/opt/cmake/bin/ctest +//ADVANCED property for variable: CMAKE_CXX_COMPILER +CMAKE_CXX_COMPILER-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_CXX_COMPILER_AR +CMAKE_CXX_COMPILER_AR-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_CXX_COMPILER_RANLIB +CMAKE_CXX_COMPILER_RANLIB-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_CXX_FLAGS +CMAKE_CXX_FLAGS-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_CXX_FLAGS_DEBUG +CMAKE_CXX_FLAGS_DEBUG-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_CXX_FLAGS_MINSIZEREL +CMAKE_CXX_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_CXX_FLAGS_RELEASE +CMAKE_CXX_FLAGS_RELEASE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_CXX_FLAGS_RELWITHDEBINFO +CMAKE_CXX_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 +//Test CMAKE_CXX_LINK_NO_PIE_SUPPORTED +CMAKE_CXX_LINK_NO_PIE_SUPPORTED:INTERNAL=1 +//Test CMAKE_CXX_LINK_PIE_SUPPORTED +CMAKE_CXX_LINK_PIE_SUPPORTED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_C_COMPILER +CMAKE_C_COMPILER-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_C_COMPILER_AR +CMAKE_C_COMPILER_AR-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_C_COMPILER_RANLIB +CMAKE_C_COMPILER_RANLIB-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_C_FLAGS +CMAKE_C_FLAGS-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_C_FLAGS_DEBUG +CMAKE_C_FLAGS_DEBUG-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_C_FLAGS_MINSIZEREL +CMAKE_C_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_C_FLAGS_RELEASE +CMAKE_C_FLAGS_RELEASE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_C_FLAGS_RELWITHDEBINFO +CMAKE_C_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 +//Test CMAKE_C_LINK_NO_PIE_SUPPORTED +CMAKE_C_LINK_NO_PIE_SUPPORTED:INTERNAL=1 +//Test CMAKE_C_LINK_PIE_SUPPORTED +CMAKE_C_LINK_PIE_SUPPORTED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_DLLTOOL +CMAKE_DLLTOOL-ADVANCED:INTERNAL=1 +//Path to cache edit program executable. +CMAKE_EDIT_COMMAND:INTERNAL=/opt/cmake/bin/ccmake +//Executable file format +CMAKE_EXECUTABLE_FORMAT:INTERNAL=ELF +//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS +CMAKE_EXE_LINKER_FLAGS-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_DEBUG +CMAKE_EXE_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_MINSIZEREL +CMAKE_EXE_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_RELEASE +CMAKE_EXE_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO +CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_EXPORT_COMPILE_COMMANDS +CMAKE_EXPORT_COMPILE_COMMANDS-ADVANCED:INTERNAL=1 +//Name of external makefile project generator. +CMAKE_EXTRA_GENERATOR:INTERNAL= +//Name of generator. +CMAKE_GENERATOR:INTERNAL=Unix Makefiles +//Generator instance identifier. +CMAKE_GENERATOR_INSTANCE:INTERNAL= +//Name of generator platform. +CMAKE_GENERATOR_PLATFORM:INTERNAL= +//Name of generator toolset. +CMAKE_GENERATOR_TOOLSET:INTERNAL= +//Source directory with the top level CMakeLists.txt file for this +// project +CMAKE_HOME_DIRECTORY:INTERNAL=/mnt/qgroundcontrol/qgroundcontrol +//ADVANCED property for variable: CMAKE_INSTALL_BINDIR +CMAKE_INSTALL_BINDIR-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_INSTALL_DATADIR +CMAKE_INSTALL_DATADIR-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_INSTALL_DATAROOTDIR +CMAKE_INSTALL_DATAROOTDIR-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_INSTALL_DOCDIR +CMAKE_INSTALL_DOCDIR-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_INSTALL_INCLUDEDIR +CMAKE_INSTALL_INCLUDEDIR-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_INSTALL_INFODIR +CMAKE_INSTALL_INFODIR-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_INSTALL_LIBDIR +CMAKE_INSTALL_LIBDIR-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_INSTALL_LIBEXECDIR +CMAKE_INSTALL_LIBEXECDIR-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_INSTALL_LOCALEDIR +CMAKE_INSTALL_LOCALEDIR-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_INSTALL_LOCALSTATEDIR +CMAKE_INSTALL_LOCALSTATEDIR-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_INSTALL_MANDIR +CMAKE_INSTALL_MANDIR-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_INSTALL_OLDINCLUDEDIR +CMAKE_INSTALL_OLDINCLUDEDIR-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_INSTALL_RUNSTATEDIR +CMAKE_INSTALL_RUNSTATEDIR-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_INSTALL_SBINDIR +CMAKE_INSTALL_SBINDIR-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_INSTALL_SHAREDSTATEDIR +CMAKE_INSTALL_SHAREDSTATEDIR-ADVANCED:INTERNAL=1 +//Install .so files without execute permission. +CMAKE_INSTALL_SO_NO_EXE:INTERNAL=1 +//ADVANCED property for variable: CMAKE_INSTALL_SYSCONFDIR +CMAKE_INSTALL_SYSCONFDIR-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_LINKER +CMAKE_LINKER-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_MAKE_PROGRAM +CMAKE_MAKE_PROGRAM-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS +CMAKE_MODULE_LINKER_FLAGS-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_DEBUG +CMAKE_MODULE_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL +CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_RELEASE +CMAKE_MODULE_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO +CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_NM +CMAKE_NM-ADVANCED:INTERNAL=1 +//number of local generators +CMAKE_NUMBER_OF_MAKEFILES:INTERNAL=1 +//ADVANCED property for variable: CMAKE_OBJCOPY +CMAKE_OBJCOPY-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_OBJDUMP +CMAKE_OBJDUMP-ADVANCED:INTERNAL=1 +//Platform information initialized +CMAKE_PLATFORM_INFO_INITIALIZED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_RANLIB +CMAKE_RANLIB-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_READELF +CMAKE_READELF-ADVANCED:INTERNAL=1 +//Path to CMake installation. +CMAKE_ROOT:INTERNAL=/opt/cmake/share/cmake-3.27 +//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS +CMAKE_SHARED_LINKER_FLAGS-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_DEBUG +CMAKE_SHARED_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL +CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_RELEASE +CMAKE_SHARED_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO +CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_SKIP_INSTALL_RPATH +CMAKE_SKIP_INSTALL_RPATH-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_SKIP_RPATH +CMAKE_SKIP_RPATH-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS +CMAKE_STATIC_LINKER_FLAGS-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_DEBUG +CMAKE_STATIC_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL +CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_RELEASE +CMAKE_STATIC_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO +CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_STRIP +CMAKE_STRIP-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_TAPI +CMAKE_TAPI-ADVANCED:INTERNAL=1 +//uname command +CMAKE_UNAME:INTERNAL=/usr/bin/uname +//ADVANCED property for variable: CMAKE_VERBOSE_MAKEFILE +CMAKE_VERBOSE_MAKEFILE-ADVANCED:INTERNAL=1 +CPM_DIRECTORY:INTERNAL=/mnt/qgroundcontrol/qgroundcontrol/cmake/modules +//Don't download or configure dependencies (for testing) +CPM_DRY_RUN:INTERNAL=OFF +CPM_FILE:INTERNAL=/mnt/qgroundcontrol/qgroundcontrol/cmake/modules/CPM.cmake +CPM_INDENT:INTERNAL=CPM: +CPM_PACKAGES:INTERNAL= +CPM_PACKAGE_LOCK_FILE:INTERNAL=/mnt/qgroundcontrol/qgroundcontrol/cpm-package-lock.cmake +CPM_VERSION:INTERNAL=0.40.8 +//Details about finding Git +FIND_PACKAGE_MESSAGE_DETAILS_Git:INTERNAL=[/usr/bin/git][v2.25.1()] +//ADVANCED property for variable: GIT_EXECUTABLE +GIT_EXECUTABLE-ADVANCED:INTERNAL=1 +//Test HAVE_LD_mold +HAVE_LD_mold:INTERNAL=1 +//linker supports push/pop state +_CMAKE_LINKER_PUSHPOP_STATE_SUPPORTED:INTERNAL=TRUE +//CMAKE_INSTALL_PREFIX during last run +_GNUInstallDirs_LAST_CMAKE_INSTALL_PREFIX:INTERNAL=/usr/local + diff --git a/cpm-package-lock.cmake b/cpm-package-lock.cmake new file mode 100644 index 000000000000..67eeaba64f31 --- /dev/null +++ b/cpm-package-lock.cmake @@ -0,0 +1,3 @@ +# CPM Package Lock +# This file should be committed to version control + From 63d833e9313d26033f2c1b9764b8a04fcab1a025 Mon Sep 17 00:00:00 2001 From: Niki-dev12 Date: Wed, 10 Sep 2025 12:26:48 +0200 Subject: [PATCH 11/11] fix flags --- src/Gimbal/GimbalController.cc | 29 +++++++++++++---------------- src/Gimbal/GimbalController.h | 2 +- 2 files changed, 14 insertions(+), 17 deletions(-) diff --git a/src/Gimbal/GimbalController.cc b/src/Gimbal/GimbalController.cc index cb5933336c67..00a8f767904c 100644 --- a/src/Gimbal/GimbalController.cc +++ b/src/Gimbal/GimbalController.cc @@ -15,9 +15,7 @@ #include "QmlObjectListModel.h" #include "SettingsManager.h" #include "Vehicle.h" -#include // for NAN - -#define M_DEG_TO_RAD_F 0.0174532925f +#include QGC_LOGGING_CATEGORY(GimbalControllerLog, "qgc.gimbal.gimbalcontroller") @@ -599,7 +597,7 @@ void GimbalController::sendGimbalRate(float pitch_rate_deg_s, float yaw_rate_deg return; } - _sendGimbalRateCommandLong(pitch_rate_deg_s, yaw_rate_deg_s); + _sendGimbalAttitudeRates(pitch_rate_deg_s, yaw_rate_deg_s); if (pitch_rate_deg_s == 0.f && yaw_rate_deg_s == 0.f) { _rateSenderTimer.stop(); @@ -608,31 +606,30 @@ void GimbalController::sendGimbalRate(float pitch_rate_deg_s, float yaw_rate_deg } } -void GimbalController::_sendGimbalRateCommandLong(float pitch_rate_deg_s, - float yaw_rate_deg_s) +void GimbalController::_sendGimbalAttitudeRates(float pitch_rate_deg_s, + float yaw_rate_deg_s) { auto sharedLink = _vehicle->vehicleLinkManager()->primaryLink().lock(); if (!sharedLink) { - qCDebug(GimbalControllerLog) << "_sendGimbalRateCommandLong: primary link gone!"; + qCDebug(GimbalControllerLog) << "_sendGimbalAttitudeRates: primary link gone!"; return; } - uint32_t flags = 0; - mavlink_message_t msg; + uint32_t flags = GIMBAL_MANAGER_FLAGS_ROLL_LOCK | GIMBAL_MANAGER_FLAGS_PITCH_LOCK; - // q is ignored when sending rates - const float qnan[4] = { NAN, NAN, NAN, NAN }; + const float qnan[4] = {NAN, NAN, NAN, NAN}; + mavlink_message_t msg; mavlink_msg_gimbal_manager_set_attitude_pack_chan( MAVLinkProtocol::instance()->getSystemId(), MAVLinkProtocol::getComponentId(), sharedLink->mavlinkChannel(), &msg, - _vehicle->id(), // target_system - static_cast(_activeGimbal->managerCompid()->rawValue().toUInt()), // target_component - flags, - static_cast(_activeGimbal->deviceId()->rawValue().toUInt()), // gimbal_device_id - qnan, // quaternion (ignored) + _vehicle->id(), + static_cast(_activeGimbal->managerCompid()->rawValue().toUInt()), + flags, + static_cast(_activeGimbal->deviceId()->rawValue().toUInt()), + qnan, NAN, qDegreesToRadians(pitch_rate_deg_s), qDegreesToRadians(yaw_rate_deg_s) diff --git a/src/Gimbal/GimbalController.h b/src/Gimbal/GimbalController.h index 87dfb4a693b7..c0a7422376bb 100644 --- a/src/Gimbal/GimbalController.h +++ b/src/Gimbal/GimbalController.h @@ -106,7 +106,7 @@ private slots: bool _tryGetGimbalControl(); bool _yawInVehicleFrame(uint32_t flags); - void _sendGimbalRateCommandLong(float pitch_rate_deg_s, float yaw_rate_deg_s); + void _sendGimbalAttitudeRates(float pitch_rate_deg_s, float yaw_rate_deg_s); QTimer _rateSenderTimer; Vehicle *_vehicle = nullptr;