Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cmake/CustomOptions.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ option(QGC_ENABLE_QT_VIDEOSTREAMING "Enable QtMultimedia video backend" OFF)
# ============================================================================

set(QGC_MAVLINK_GIT_REPO "https://github.com/mavlink/mavlink.git" CACHE STRING "MAVLink repository URL")
set(QGC_MAVLINK_GIT_TAG "b1fb5a1a32c41c6e46fea70600d626a0b5a8edbe" CACHE STRING "MAVLink repository commit/tag")
set(QGC_MAVLINK_GIT_TAG "c409cf690454db6d3e004bd14173bc6c7ff1e0ff" CACHE STRING "MAVLink repository commit/tag")
set(QGC_MAVLINK_DIALECT "all" CACHE STRING "MAVLink dialect")
set(QGC_MAVLINK_VERSION "2.0" CACHE STRING "MAVLink protocol version")

Expand Down
8 changes: 4 additions & 4 deletions src/Toolbar/GCSControlIndicator.qml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ Item {

property var activeVehicle: QGroundControl.multiVehicleManager.activeVehicle
property bool showIndicator: activeVehicle && activeVehicle.firstControlStatusReceived
property var sysidInControl: activeVehicle ? activeVehicle.sysidInControl : 0
property var gcsMain: activeVehicle ? activeVehicle.gcsMain : 0
property bool gcsControlStatusFlags_SystemManager: activeVehicle ? activeVehicle.gcsControlStatusFlags_SystemManager : false
property bool gcsControlStatusFlags_TakeoverAllowed: activeVehicle ? activeVehicle.gcsControlStatusFlags_TakeoverAllowed : false
property Fact requestControlAllowTakeoverFact: QGroundControl.settingsManager.flyViewSettings.requestControlAllowTakeover
property bool requestControlAllowTakeover: requestControlAllowTakeoverFact.rawValue
property bool isThisGCSinControl: sysidInControl == QGroundControl.settingsManager.mavlinkSettings.gcsMavlinkSystemID.rawValue
property bool isThisGCSinControl: gcsMain == QGroundControl.settingsManager.mavlinkSettings.gcsMavlinkSystemID.rawValue
property bool sendControlRequestAllowed: activeVehicle ? activeVehicle.sendControlRequestAllowed : false

property var margins: ScreenTools.defaultFontPixelWidth
Expand Down Expand Up @@ -235,7 +235,7 @@ Item {
font.bold: true
}
QGCLabel {
text: isThisGCSinControl ? (qsTr("This GCS") + " (" + sysidInControl + ")" ) : sysidInControl
text: isThisGCSinControl ? (qsTr("This GCS") + " (" + gcsMain + ")" ) : gcsMain
font.bold: isThisGCSinControl
color: isThisGCSinControl ? qgcPal.colorGreen : qgcPal.text
Layout.alignment: Qt.AlignRight
Expand Down Expand Up @@ -362,7 +362,7 @@ Item {
// Current GCS in control indicator
QGCLabel {
id: gcsInControlIndicator
text: sysidInControl
text: gcsMain
font.bold: true
font.pointSize: ScreenTools.smallFontPointSize * 1.1
color: isThisGCSinControl ? qgcPal.colorGreen : qgcPal.text
Expand Down
6 changes: 3 additions & 3 deletions src/Vehicle/Vehicle.cc
Original file line number Diff line number Diff line change
Expand Up @@ -3182,7 +3182,7 @@ void Vehicle::startTimerRevertAllowTakeover()
disconnect(&_timerRevertAllowTakeover, &QTimer::timeout, nullptr, nullptr);

connect(&_timerRevertAllowTakeover, &QTimer::timeout, this, [this](){
if (MAVLinkProtocol::instance()->getSystemId() == _sysid_in_control) {
if (MAVLinkProtocol::instance()->getSystemId() == _gcsMain) {
this->requestOperatorControl(false);
}
});
Expand Down Expand Up @@ -3278,8 +3278,8 @@ void Vehicle::_handleControlStatus(const mavlink_message_t& message)
updateControlStatusSignals = true;
}

if (_sysid_in_control != controlStatus.sysid_in_control) {
_sysid_in_control = controlStatus.sysid_in_control;
if (_gcsMain != controlStatus.gcs_main) {
_gcsMain = controlStatus.gcs_main;
updateControlStatusSignals = true;
}

Expand Down
6 changes: 3 additions & 3 deletions src/Vehicle/Vehicle.h
Original file line number Diff line number Diff line change
Expand Up @@ -1157,15 +1157,15 @@ private slots:
void _handleCommandRequestOperatorControl(const mavlink_command_long_t commandLong);
static void _requestOperatorControlAckHandler(void* resultHandlerData, int compId, const mavlink_command_ack_t& ack, MavCmdResultFailureCode_t failureCode);

Q_PROPERTY(uint8_t sysidInControl READ sysidInControl NOTIFY gcsControlStatusChanged)
Q_PROPERTY(uint8_t gcsMain READ gcsMain NOTIFY gcsControlStatusChanged)
Q_PROPERTY(bool gcsControlStatusFlags_SystemManager READ gcsControlStatusFlags_SystemManager NOTIFY gcsControlStatusChanged)
Q_PROPERTY(bool gcsControlStatusFlags_TakeoverAllowed READ gcsControlStatusFlags_TakeoverAllowed NOTIFY gcsControlStatusChanged)
Q_PROPERTY(bool firstControlStatusReceived READ firstControlStatusReceived NOTIFY gcsControlStatusChanged)
Q_PROPERTY(int operatorControlTakeoverTimeoutMsecs READ operatorControlTakeoverTimeoutMsecs CONSTANT)
Q_PROPERTY(int requestOperatorControlRemainingMsecs READ requestOperatorControlRemainingMsecs CONSTANT)
Q_PROPERTY(bool sendControlRequestAllowed READ sendControlRequestAllowed NOTIFY sendControlRequestAllowedChanged)

uint8_t sysidInControl() const { return _sysid_in_control; }
uint8_t gcsMain() const { return _gcsMain; }
bool gcsControlStatusFlags_SystemManager() const { return _gcsControlStatusFlags_SystemManager; }
bool gcsControlStatusFlags_TakeoverAllowed() const { return _gcsControlStatusFlags_TakeoverAllowed; }
bool firstControlStatusReceived() const { return _firstControlStatusReceived; }
Expand All @@ -1174,7 +1174,7 @@ private slots:
bool sendControlRequestAllowed() const { return _sendControlRequestAllowed; }
void requestOperatorControlStartTimer(int requestTimeoutMsecs);

uint8_t _sysid_in_control = 0;
uint8_t _gcsMain = 0;
uint8_t _gcsControlStatusFlags = 0;
bool _gcsControlStatusFlags_SystemManager = 0;
bool _gcsControlStatusFlags_TakeoverAllowed = 0;
Expand Down
Loading