diff --git a/ground/openpilotgcs/src/plugins/config/airframe.ui b/ground/openpilotgcs/src/plugins/config/airframe.ui
index f3be6b444..f3acc28e9 100644
--- a/ground/openpilotgcs/src/plugins/config/airframe.ui
+++ b/ground/openpilotgcs/src/plugins/config/airframe.ui
@@ -1389,13 +1389,13 @@ margin:1px;
false
-
+
-
-
+
-
-
+
-
-
+
0
@@ -1417,7 +1417,7 @@ margin:1px;
-
-
+
Qt::Horizontal
@@ -1432,7 +1432,7 @@ margin:1px;
-
-
+
-
@@ -1462,9 +1462,9 @@ margin:1px;
-
-
+
-
-
+
0
@@ -1480,7 +1480,7 @@ margin:1px;
Output channel asignmets
-
+
-
@@ -1644,11 +1644,11 @@ margin:1px;
Differential Steering Mix
-
+
-
-
+
-
-
+
-
@@ -1685,7 +1685,7 @@ margin:1px;
-
-
+
-
@@ -1727,7 +1727,7 @@ margin:1px;
-
-
+
Qt::Horizontal
@@ -1750,7 +1750,7 @@ margin:1px;
Front throttle curve
-
+
-
@@ -1807,7 +1807,7 @@ margin:1px;
Rear throttle curve
-
+
-
@@ -1850,7 +1850,7 @@ margin:1px;
-
-
+
Qt::Vertical
@@ -1863,9 +1863,9 @@ margin:1px;
-
-
+
-
-
+
Qt::Horizontal
diff --git a/ground/openpilotgcs/src/plugins/config/configvehicletypewidget.cpp b/ground/openpilotgcs/src/plugins/config/configvehicletypewidget.cpp
index b16236fa0..cc7b580b9 100644
--- a/ground/openpilotgcs/src/plugins/config/configvehicletypewidget.cpp
+++ b/ground/openpilotgcs/src/plugins/config/configvehicletypewidget.cpp
@@ -119,7 +119,7 @@ ConfigVehicleTypeWidget::ConfigVehicleTypeWidget(QWidget *parent) : ConfigTaskWi
QStringList airframeTypes;
airframeTypes << "Fixed Wing" << "Multirotor" << "Helicopter" << "Ground" << "Custom";
m_aircraft->aircraftType->addItems(airframeTypes);
- m_aircraft->aircraftType->setCurrentIndex(1);
+ m_aircraft->aircraftType->setCurrentIndex(0); //Set default vehicle to Fixed Wing
QStringList fixedWingTypes;
fixedWingTypes << "Elevator aileron rudder" << "Elevon" << "Vtail";
@@ -655,7 +655,8 @@ void ConfigVehicleTypeWidget::setupAirframeUI(QString frameType)
frameType == "HexaCoax" || frameType == "Hexacopter Y6" ||
frameType == "Octo" || frameType == "Octocopter" ||
frameType == "OctoV" || frameType == "Octocopter V" ||
- frameType == "OctoCoaxP" || frameType == "Octo Coax +" ) {
+ frameType == "OctoCoaxP" || frameType == "Octo Coax +" ||
+ frameType == "OctoCoaxX" || frameType == "Octo Coax X" ) {
//Call multi-rotor setup UI
setupMultiRotorUI(frameType);
diff --git a/ground/openpilotgcs/src/plugins/config/stabilization.ui b/ground/openpilotgcs/src/plugins/config/stabilization.ui
index d64031aa0..ef0b52a15 100755
--- a/ground/openpilotgcs/src/plugins/config/stabilization.ui
+++ b/ground/openpilotgcs/src/plugins/config/stabilization.ui
@@ -3383,6 +3383,10 @@ border-radius: 5;
Qt::StrongFocus
+
+ Slowly raise Proportional until you start seeing clear oscillations when you fly.
+Then lower the value by 5 or so.
+
@@ -3433,6 +3437,10 @@ border-radius: 5;
Qt::StrongFocus
+
+ Slowly raise Proportional until you start seeing clear oscillations when you fly.
+Then lower the value by 5 or so.
+
200
@@ -3484,6 +3492,10 @@ border-radius: 5;
Qt::StrongFocus
+
+ Slowly raise Proportional until you start seeing clear oscillations when you fly.
+Then lower the value by 5 or so.
+
@@ -3531,6 +3543,10 @@ border-radius: 5;
Qt::StrongFocus
+
+ Slowly raise Proportional until you start seeing clear oscillations when you fly.
+Then lower the value by 5 or so.
+
200
@@ -3582,6 +3598,10 @@ border-radius: 5;
Qt::StrongFocus
+
+ Slowly raise Proportional until you start seeing clear oscillations when you fly.
+Then lower the value by 5 or so.
+
@@ -3629,6 +3649,10 @@ border-radius: 5;
Qt::StrongFocus
+
+ Slowly raise Proportional until you start seeing clear oscillations when you fly.
+Then lower the value by 5 or so.
+
200
@@ -3683,6 +3707,10 @@ border-radius: 5;
Qt::StrongFocus
+
+ As a rule of thumb, you can set the Integral at roughly the same
+value as the Kp.
+
@@ -3730,6 +3758,10 @@ border-radius: 5;
Qt::StrongFocus
+
+ As a rule of thumb, you can set the Integral at roughly the same
+value as the Kp.
+
200
@@ -3765,6 +3797,10 @@ border-radius: 5;
Qt::StrongFocus
+
+ As a rule of thumb, you can set the Integral at roughly the same
+value as the Kp.
+
@@ -3812,6 +3848,10 @@ border-radius: 5;
Qt::StrongFocus
+
+ As a rule of thumb, you can set the Integral at roughly the same
+value as the Kp.
+
200
@@ -3847,6 +3887,10 @@ border-radius: 5;
Qt::StrongFocus
+
+ As a rule of thumb, you can set the Integral at roughly the same
+value as the Kp.
+
@@ -3894,6 +3938,10 @@ border-radius: 5;
Qt::StrongFocus
+
+ As a rule of thumb, you can set the Integral at roughly the same
+value as the Kp.
+
200
@@ -11709,6 +11757,10 @@ automatically every 300ms, which will help for fast tuning.
8
+
+ Reloads the saved settings into GCS.
+Useful if you have accidentally changed some settings.
+
QPushButton {
border: 1px outset #999;
diff --git a/ground/openpilotgcs/src/plugins/uavobjects/uavobject.cpp b/ground/openpilotgcs/src/plugins/uavobjects/uavobject.cpp
index c1ba625fc..47960b060 100644
--- a/ground/openpilotgcs/src/plugins/uavobjects/uavobject.cpp
+++ b/ground/openpilotgcs/src/plugins/uavobjects/uavobject.cpp
@@ -531,7 +531,7 @@ void UAVObject::SetGcsAccess(UAVObject::Metadata& metadata, UAVObject::AccessMod
* \param[in] metadata The metadata object
* \return the telemetry acked boolean
*/
-uint8_t UAVObject::GetFlightTelemetryAcked(const UAVObject::Metadata& metadata) {
+quint8 UAVObject::GetFlightTelemetryAcked(const UAVObject::Metadata& metadata) {
return (metadata.flags >> UAVOBJ_TELEMETRY_ACKED_SHIFT) & 1;
}
@@ -540,7 +540,7 @@ uint8_t UAVObject::GetFlightTelemetryAcked(const UAVObject::Metadata& metadata)
* \param[in] metadata The metadata object
* \param[in] val The telemetry acked boolean
*/
-void UAVObject::SetFlightTelemetryAcked(UAVObject::Metadata& metadata, uint8_t val) {
+void UAVObject::SetFlightTelemetryAcked(UAVObject::Metadata& metadata, quint8 val) {
SET_BITS(metadata.flags, UAVOBJ_TELEMETRY_ACKED_SHIFT, val, 1);
}
@@ -549,7 +549,7 @@ void UAVObject::SetFlightTelemetryAcked(UAVObject::Metadata& metadata, uint8_t v
* \param[in] metadata The metadata object
* \return the telemetry acked boolean
*/
-uint8_t UAVObject::GetGcsTelemetryAcked(const UAVObject::Metadata& metadata) {
+quint8 UAVObject::GetGcsTelemetryAcked(const UAVObject::Metadata& metadata) {
return (metadata.flags >> UAVOBJ_GCS_TELEMETRY_ACKED_SHIFT) & 1;
}
@@ -558,7 +558,7 @@ uint8_t UAVObject::GetGcsTelemetryAcked(const UAVObject::Metadata& metadata) {
* \param[in] metadata The metadata object
* \param[in] val The GCS telemetry acked boolean
*/
-void UAVObject::SetGcsTelemetryAcked(UAVObject::Metadata& metadata, uint8_t val) {
+void UAVObject::SetGcsTelemetryAcked(UAVObject::Metadata& metadata, quint8 val) {
SET_BITS(metadata.flags, UAVOBJ_GCS_TELEMETRY_ACKED_SHIFT, val, 1);
}
diff --git a/ground/openpilotgcs/src/plugins/uavobjects/uavobject.h b/ground/openpilotgcs/src/plugins/uavobjects/uavobject.h
index 228f86b2b..945672c61 100644
--- a/ground/openpilotgcs/src/plugins/uavobjects/uavobject.h
+++ b/ground/openpilotgcs/src/plugins/uavobjects/uavobject.h
@@ -90,10 +90,10 @@ public:
* 6-7 gcsTelemetryUpdateMode Update mode used by the GCS (UAVObjUpdateMode)
*/
typedef struct {
- uint8_t flags; /** Defines flags for update and logging modes and whether an update should be ACK'd (bits defined above) */
- uint16_t flightTelemetryUpdatePeriod; /** Update period used by the telemetry module (only if telemetry mode is PERIODIC) */
- uint16_t gcsTelemetryUpdatePeriod; /** Update period used by the GCS (only if telemetry mode is PERIODIC) */
- uint16_t loggingUpdatePeriod; /** Update period used by the logging module (only if logging mode is PERIODIC) */
+ quint8 flags; /** Defines flags for update and logging modes and whether an update should be ACK'd (bits defined above) */
+ quint16 flightTelemetryUpdatePeriod; /** Update period used by the telemetry module (only if telemetry mode is PERIODIC) */
+ quint16 gcsTelemetryUpdatePeriod; /** Update period used by the GCS (only if telemetry mode is PERIODIC) */
+ quint16 loggingUpdatePeriod; /** Update period used by the logging module (only if logging mode is PERIODIC) */
} __attribute__((packed)) Metadata;
@@ -132,10 +132,10 @@ public:
static void SetFlightAccess(Metadata& meta, AccessMode mode);
static AccessMode GetGcsAccess(const Metadata& meta);
static void SetGcsAccess(Metadata& meta, AccessMode mode);
- static uint8_t GetFlightTelemetryAcked(const Metadata& meta);
- static void SetFlightTelemetryAcked(Metadata& meta, uint8_t val);
- static uint8_t GetGcsTelemetryAcked(const Metadata& meta);
- static void SetGcsTelemetryAcked(Metadata& meta, uint8_t val);
+ static quint8 GetFlightTelemetryAcked(const Metadata& meta);
+ static void SetFlightTelemetryAcked(Metadata& meta, quint8 val);
+ static quint8 GetGcsTelemetryAcked(const Metadata& meta);
+ static void SetGcsTelemetryAcked(Metadata& meta, quint8 val);
static UpdateMode GetFlightTelemetryUpdateMode(const Metadata& meta);
static void SetFlightTelemetryUpdateMode(Metadata& meta, UpdateMode val);
static UpdateMode GetGcsTelemetryUpdateMode(const Metadata& meta);
diff --git a/ground/openpilotgcs/src/plugins/uavobjectwidgetutils/configtaskwidget.cpp b/ground/openpilotgcs/src/plugins/uavobjectwidgetutils/configtaskwidget.cpp
index 51bafbb2d..8bd2fe7b5 100644
--- a/ground/openpilotgcs/src/plugins/uavobjectwidgetutils/configtaskwidget.cpp
+++ b/ground/openpilotgcs/src/plugins/uavobjectwidgetutils/configtaskwidget.cpp
@@ -31,7 +31,7 @@
/**
* Constructor
*/
-ConfigTaskWidget::ConfigTaskWidget(QWidget *parent) : QWidget(parent),isConnected(false),smartsave(NULL),dirty(false),outOfLimitsStyle("background-color: rgb(255, 0, 0);")
+ConfigTaskWidget::ConfigTaskWidget(QWidget *parent) : QWidget(parent),isConnected(false),smartsave(NULL),dirty(false),outOfLimitsStyle("background-color: rgb(255, 0, 0);"),timeOut(NULL)
{
pm = ExtensionSystem::PluginManager::instance();
objManager = pm->getObject();
@@ -175,6 +175,10 @@ ConfigTaskWidget::~ConfigTaskWidget()
if(oTw)
delete oTw;
}
+ if(timeOut)
+ {
+ delete timeOut;
+ }
}
void ConfigTaskWidget::saveObjectToSD(UAVObject *obj)
@@ -780,7 +784,7 @@ void ConfigTaskWidget::reloadButtonClicked()
if(!list)
return;
ObjectPersistence* objper = dynamic_cast( getObjectManager()->getObject(ObjectPersistence::NAME) );
- QTimer * timeOut=new QTimer(this);
+ timeOut=new QTimer(this);
QEventLoop * eventLoop=new QEventLoop(this);
connect(timeOut, SIGNAL(timeout()),eventLoop,SLOT(quit()));
connect(objper, SIGNAL(objectUpdated(UAVObject*)), eventLoop, SLOT(quit()));
@@ -799,13 +803,22 @@ void ConfigTaskWidget::reloadButtonClicked()
eventLoop->exec();
if(timeOut->isActive())
{
+ oTw->object->requestUpdate();
setWidgetFromField(oTw->widget,oTw->field,oTw->index,oTw->scale,oTw->isLimited);
}
timeOut->stop();
}
}
- delete eventLoop;
- delete timeOut;
+ if(eventLoop)
+ {
+ delete eventLoop;
+ eventLoop=NULL;
+ }
+ if(timeOut)
+ {
+ delete timeOut;
+ timeOut=NULL;
+ }
}
/**
diff --git a/ground/openpilotgcs/src/plugins/uavobjectwidgetutils/configtaskwidget.h b/ground/openpilotgcs/src/plugins/uavobjectwidgetutils/configtaskwidget.h
index a0e1feb7b..f835a417d 100644
--- a/ground/openpilotgcs/src/plugins/uavobjectwidgetutils/configtaskwidget.h
+++ b/ground/openpilotgcs/src/plugins/uavobjectwidgetutils/configtaskwidget.h
@@ -164,6 +164,7 @@ private:
void disconnectWidgetUpdatesToSlot(QWidget *widget, const char *function);
void loadWidgetLimits(QWidget *widget, UAVObjectField *field, int index, bool hasLimits, double sclale);
QString outOfLimitsStyle;
+ QTimer * timeOut;
protected slots:
virtual void disableObjUpdates();
virtual void enableObjUpdates();
diff --git a/ground/openpilotgcs/src/plugins/uploader/devicewidget.cpp b/ground/openpilotgcs/src/plugins/uploader/devicewidget.cpp
index 39c7618c5..0393d5534 100644
--- a/ground/openpilotgcs/src/plugins/uploader/devicewidget.cpp
+++ b/ground/openpilotgcs/src/plugins/uploader/devicewidget.cpp
@@ -404,10 +404,12 @@ void deviceWidget::uploadFirmware()
status("Starting firmware upload", STATUSICON_RUNNING);
// We don't know which device was used previously, so we
// are cautious and reenter DFU for this deviceID:
+ emit uploadStarted();
if(!m_dfu->enterDFU(deviceID))
{
status("Error:Could not enter DFU mode", STATUSICON_FAIL);
myDevice->updateButton->setEnabled(true);
+ emit uploadEnded(false);
return;
}
OP_DFU::Status ret=m_dfu->StatusRequest();
@@ -421,6 +423,7 @@ void deviceWidget::uploadFirmware()
if(!retstatus ) {
status("Could not start upload", STATUSICON_FAIL);
myDevice->updateButton->setEnabled(true);
+ emit uploadEnded(false);
return;
}
status("Uploading, please wait...", STATUSICON_RUNNING);
@@ -480,6 +483,7 @@ void deviceWidget::uploadFinished(OP_DFU::Status retstatus)
disconnect(m_dfu, SIGNAL(operationProgress(QString)), this, SLOT(dfuStatus(QString)));
if(retstatus != OP_DFU::Last_operation_Success) {
status(QString("Upload failed with code: ") + m_dfu->StatusToString(retstatus).toLatin1().data(), STATUSICON_FAIL);
+ emit uploadEnded(false);
return;
} else
if (!descriptionArray.isEmpty()) {
@@ -489,6 +493,7 @@ void deviceWidget::uploadFinished(OP_DFU::Status retstatus)
retstatus = m_dfu->UploadDescription(descriptionArray);
if( retstatus != OP_DFU::Last_operation_Success) {
status(QString("Upload failed with code: ") + m_dfu->StatusToString(retstatus).toLatin1().data(), STATUSICON_FAIL);
+ emit uploadEnded(false);
return;
}
@@ -499,10 +504,12 @@ void deviceWidget::uploadFinished(OP_DFU::Status retstatus)
retstatus = m_dfu->UploadDescription(myDevice->description->text());
if( retstatus != OP_DFU::Last_operation_Success) {
status(QString("Upload failed with code: ") + m_dfu->StatusToString(retstatus).toLatin1().data(), STATUSICON_FAIL);
+ emit uploadEnded(false);
return;
}
}
populate();
+ emit uploadEnded(true);
status("Upload successful", STATUSICON_OK);
}
diff --git a/ground/openpilotgcs/src/plugins/uploader/devicewidget.h b/ground/openpilotgcs/src/plugins/uploader/devicewidget.h
index cf011f066..6415985df 100644
--- a/ground/openpilotgcs/src/plugins/uploader/devicewidget.h
+++ b/ground/openpilotgcs/src/plugins/uploader/devicewidget.h
@@ -72,7 +72,8 @@ private:
bool populateLoadedStructuredDescription(QByteArray arr);
signals:
-
+ void uploadStarted();
+ void uploadEnded(bool success);
public slots:
void uploadFirmware();
void loadFirmware();
diff --git a/ground/openpilotgcs/src/plugins/uploader/uploadergadgetwidget.cpp b/ground/openpilotgcs/src/plugins/uploader/uploadergadgetwidget.cpp
index 31788eb57..a1008306c 100755
--- a/ground/openpilotgcs/src/plugins/uploader/uploadergadgetwidget.cpp
+++ b/ground/openpilotgcs/src/plugins/uploader/uploadergadgetwidget.cpp
@@ -116,6 +116,12 @@ QString UploaderGadgetWidget::getPortDevice(const QString &friendName)
}
return "";
}
+
+void UploaderGadgetWidget::connectSignalSlot(QWidget *widget)
+{
+ connect(qobject_cast(widget),SIGNAL(uploadStarted()),this,SLOT(uploadStarted()));
+ connect(qobject_cast(widget),SIGNAL(uploadEnded(bool)),this,SLOT(uploadEnded(bool)));
+}
void UploaderGadgetWidget::onPhisicalHWConnect()
{
m_config->bootButton->setEnabled(false);
@@ -305,6 +311,7 @@ void UploaderGadgetWidget::goToBootloader(UAVObject* callerObj, bool success)
}
for(int i=0;inumberOfDevices;i++) {
deviceWidget* dw = new deviceWidget(this);
+ connectSignalSlot(dw);
dw->setDeviceID(i);
dw->setDfu(dfu);
dw->populate();
@@ -540,6 +547,7 @@ void UploaderGadgetWidget::systemRescue()
}
for(int i=0;inumberOfDevices;i++) {
deviceWidget* dw = new deviceWidget(this);
+ connectSignalSlot(dw);
dw->setDeviceID(i);
dw->setDfu(dfu);
dw->populate();
@@ -567,6 +575,19 @@ void UploaderGadgetWidget::cancel()
m_eventloop.exit();
}
+void UploaderGadgetWidget::uploadStarted()
+{
+ m_config->bootButton->setEnabled(false);
+ m_config->safeBootButton->setEnabled(false);
+}
+
+void UploaderGadgetWidget::uploadEnded(bool succeed)
+{
+ Q_UNUSED(succeed);
+ m_config->bootButton->setEnabled(true);
+ m_config->safeBootButton->setEnabled(true);
+}
+
/**
Update log entry
*/
diff --git a/ground/openpilotgcs/src/plugins/uploader/uploadergadgetwidget.h b/ground/openpilotgcs/src/plugins/uploader/uploadergadgetwidget.h
index 2c6814827..5f5706381 100755
--- a/ground/openpilotgcs/src/plugins/uploader/uploadergadgetwidget.h
+++ b/ground/openpilotgcs/src/plugins/uploader/uploadergadgetwidget.h
@@ -88,6 +88,7 @@ private:
QLineEdit* openFileNameLE;
QEventLoop m_eventloop;
QErrorMessage * msg;
+ void connectSignalSlot(QWidget * widget);
private slots:
void onPhisicalHWConnect();
void versionMatchCheck();
@@ -102,6 +103,8 @@ private slots:
void getSerialPorts();
void perform();
void cancel();
+ void uploadStarted();
+ void uploadEnded(bool succeed);
};