From 38b96adf2d9ec23d3ce5db36e753de9b078c2b31 Mon Sep 17 00:00:00 2001 From: Julian Oes Date: Tue, 19 Feb 2013 12:12:49 -0800 Subject: [PATCH] Arming flag is now included when flight mode is changed in the ControlWidget --- src/ui/uas/UASControlWidget.cc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/ui/uas/UASControlWidget.cc b/src/ui/uas/UASControlWidget.cc index 06161d291..9d970ee05 100644 --- a/src/ui/uas/UASControlWidget.cc +++ b/src/ui/uas/UASControlWidget.cc @@ -178,6 +178,12 @@ void UASControlWidget::transmitMode() UASInterface* mav = UASManager::instance()->getUASForId(this->uas); if (mav) { + // include armed state + if (engineOn) + uasMode |= MAV_MODE_FLAG_SAFETY_ARMED; + else + uasMode &= ~MAV_MODE_FLAG_SAFETY_ARMED; + mav->setMode(uasMode); QString mode = ui.modeComboBox->currentText(); -- 2.22.0