diff --git a/artwork/Dials/deluxe/lineardial-horizontal.svg b/artwork/Dials/deluxe/lineardial-horizontal.svg
old mode 100644
new mode 100755
index 2f6f71b17..e37172ec0
--- a/artwork/Dials/deluxe/lineardial-horizontal.svg
+++ b/artwork/Dials/deluxe/lineardial-horizontal.svg
@@ -14,8 +14,8 @@
height="70.597504"
id="svg10068"
version="1.1"
- inkscape:version="0.48.1 "
- sodipodi:docname="lineardial-horizontal.svg"
+ inkscape:version="0.48.2 r9819"
+ sodipodi:docname="lineardial-horizontal-old2.svg"
inkscape:export-filename="H:\Documents\Hobbies\W433\My Gauges\vbat-001.png"
inkscape:export-xdpi="103.61"
inkscape:export-ydpi="103.61"
@@ -25,15 +25,19 @@
+ offset="0.31684026"
+ style="stop-color:#a3a3a3;stop-opacity:1;" />
+
@@ -57,15 +61,11 @@
+ style="stop-color:#8a8a8a;stop-opacity:1;" />
-
+ id="stop4391" />
@@ -237,15 +237,15 @@
+ style="stop-color:#676767;stop-opacity:1;" />
+ style="stop-color:#7d7d7d;stop-opacity:1;" />
@@ -425,46 +425,34 @@
-
+ offset="0"
+ style="stop-color:#ffc001;stop-opacity:1;" />
-
-
+ offset="0"
+ style="stop-color:#e60000;stop-opacity:1;" />
@@ -687,7 +675,7 @@
x2="87.074203"
y2="168.83261"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0,0.99999995,-0.99999975,0,-11.23354,-270.8763)" />
+ gradientTransform="matrix(0,1.0110991,-1.0062411,0,-10.360287,-272.19756)" />
+ gradientTransform="matrix(0,1.0224134,-1.0048488,0,-10.554719,-273.54528)" />
+ gradientTransform="matrix(0,1,-1.0055415,0,-10.459485,-270.8763)" />
+ transform="translate(-368.2988,-507.08981)">
@@ -1225,17 +1212,16 @@
id="layer5"
inkscape:label="Green Zone"
style="display:inline"
- transform="translate(-140.85549,-141.35611)"
- sodipodi:insensitive="true">
+ transform="translate(-140.85549,-141.35611)">
+ transform="translate(-140.85549,-141.35611)">
+ transform="translate(-140.85549,-141.35611)">
+ transform="translate(-140.85549,-141.35611)">
+ transform="matrix(0,1,-1,0,0,0)"
+ ry="2.5494981"
+ rx="1.9392394" />
+
+
+
+
+ style="stop-color:#656565;stop-opacity:1;" />
+ style="stop-color:#757575;stop-opacity:1;" />
@@ -83,15 +94,19 @@
+ style="stop-color:#9c9c9c;stop-opacity:0;" />
+ id="stop3921"
+ offset="0.359375"
+ style="stop-color:#6c6c6c;stop-opacity:0.88793105;" />
+
+ style="stop-color:#9c9c9c;stop-opacity:0;" />
@@ -215,46 +230,34 @@
-
+ offset="0"
+ style="stop-color:#ffc001;stop-opacity:1;" />
-
-
+ offset="0"
+ style="stop-color:#e60000;stop-opacity:1;" />
@@ -475,7 +478,8 @@
y1="132.84332"
x2="-58.661255"
y2="169.46072"
- gradientUnits="userSpaceOnUse" />
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1.0045664,0,0,0.98072534,3.8285685,3.8328979)" />
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1.0048708,0,0,1.0000284,3.816285,2.2385824)" />
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1.0057658,0,0,0.99502095,3.8176724,2.8357789)" />
+ y2="412.00528"
+ gradientTransform="matrix(1,0,0,0.98663274,0,3.8538758)" />
+ x2="-136.75557"
+ y2="74.015358" />
+
image/svg+xml
-
+
Edouard Lafargue
@@ -779,8 +796,7 @@
inkscape:label="Dark background"
id="g2932"
inkscape:groupmode="layer"
- transform="translate(-357.06525,-236.21351)"
- sodipodi:insensitive="true">
+ transform="translate(-357.06525,-236.21351)">
@@ -789,39 +805,39 @@
style="fill:url(#linearGradient5344);fill-opacity:1;stroke:none"
id="rect2936"
width="318.58304"
- height="46.756046"
+ height="46.131046"
x="-556.79657"
- y="358.44128"
- ry="3.4504199"
+ y="357.50378"
+ ry="3.4042974"
inkscape:export-filename="H:\Documents\Hobbies\W433\g9905.png"
inkscape:export-xdpi="88.809998"
inkscape:export-ydpi="88.809998" />
-
+ style="fill:url(#linearGradient3900);fill-opacity:1;stroke:none" />
+
+ transform="translate(-129.62194,129.52019)">
+ style="display:inline"
+ transform="translate(-129.62194,129.52019)">
+ transform="translate(-129.62194,129.52019)">
+ width="34.173222"
+ height="5.9349518"
+ x="136.20108"
+ y="-114.68695"
+ inkscape:label="#rect5246"
+ ry="2.4981377" />
+ transform="translate(-129.62194,129.52019)">
diff --git a/ground/openpilotgcs/share/openpilotgcs/dials/deluxe/lineardial-horizontal.svg b/ground/openpilotgcs/share/openpilotgcs/dials/deluxe/lineardial-horizontal.svg
old mode 100644
new mode 100755
index 2f6f71b17..e37172ec0
--- a/ground/openpilotgcs/share/openpilotgcs/dials/deluxe/lineardial-horizontal.svg
+++ b/ground/openpilotgcs/share/openpilotgcs/dials/deluxe/lineardial-horizontal.svg
@@ -14,8 +14,8 @@
height="70.597504"
id="svg10068"
version="1.1"
- inkscape:version="0.48.1 "
- sodipodi:docname="lineardial-horizontal.svg"
+ inkscape:version="0.48.2 r9819"
+ sodipodi:docname="lineardial-horizontal-old2.svg"
inkscape:export-filename="H:\Documents\Hobbies\W433\My Gauges\vbat-001.png"
inkscape:export-xdpi="103.61"
inkscape:export-ydpi="103.61"
@@ -25,15 +25,19 @@
+ offset="0.31684026"
+ style="stop-color:#a3a3a3;stop-opacity:1;" />
+
@@ -57,15 +61,11 @@
+ style="stop-color:#8a8a8a;stop-opacity:1;" />
-
+ id="stop4391" />
@@ -237,15 +237,15 @@
+ style="stop-color:#676767;stop-opacity:1;" />
+ style="stop-color:#7d7d7d;stop-opacity:1;" />
@@ -425,46 +425,34 @@
-
+ offset="0"
+ style="stop-color:#ffc001;stop-opacity:1;" />
-
-
+ offset="0"
+ style="stop-color:#e60000;stop-opacity:1;" />
@@ -687,7 +675,7 @@
x2="87.074203"
y2="168.83261"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0,0.99999995,-0.99999975,0,-11.23354,-270.8763)" />
+ gradientTransform="matrix(0,1.0110991,-1.0062411,0,-10.360287,-272.19756)" />
+ gradientTransform="matrix(0,1.0224134,-1.0048488,0,-10.554719,-273.54528)" />
+ gradientTransform="matrix(0,1,-1.0055415,0,-10.459485,-270.8763)" />
+ transform="translate(-368.2988,-507.08981)">
@@ -1225,17 +1212,16 @@
id="layer5"
inkscape:label="Green Zone"
style="display:inline"
- transform="translate(-140.85549,-141.35611)"
- sodipodi:insensitive="true">
+ transform="translate(-140.85549,-141.35611)">
+ transform="translate(-140.85549,-141.35611)">
+ transform="translate(-140.85549,-141.35611)">
+ transform="translate(-140.85549,-141.35611)">
+ transform="matrix(0,1,-1,0,0,0)"
+ ry="2.5494981"
+ rx="1.9392394" />
+
+
+
+
+ style="stop-color:#656565;stop-opacity:1;" />
+ style="stop-color:#757575;stop-opacity:1;" />
@@ -83,15 +94,19 @@
+ style="stop-color:#9c9c9c;stop-opacity:0;" />
+ id="stop3921"
+ offset="0.359375"
+ style="stop-color:#6c6c6c;stop-opacity:0.88793105;" />
+
+ style="stop-color:#9c9c9c;stop-opacity:0;" />
@@ -215,46 +230,34 @@
-
+ offset="0"
+ style="stop-color:#ffc001;stop-opacity:1;" />
-
-
+ offset="0"
+ style="stop-color:#e60000;stop-opacity:1;" />
@@ -475,7 +478,8 @@
y1="132.84332"
x2="-58.661255"
y2="169.46072"
- gradientUnits="userSpaceOnUse" />
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1.0045664,0,0,0.98072534,3.8285685,3.8328979)" />
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1.0048708,0,0,1.0000284,3.816285,2.2385824)" />
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1.0057658,0,0,0.99502095,3.8176724,2.8357789)" />
+ y2="412.00528"
+ gradientTransform="matrix(1,0,0,0.98663274,0,3.8538758)" />
+ x2="-136.75557"
+ y2="74.015358" />
+
image/svg+xml
-
+
Edouard Lafargue
@@ -779,8 +796,7 @@
inkscape:label="Dark background"
id="g2932"
inkscape:groupmode="layer"
- transform="translate(-357.06525,-236.21351)"
- sodipodi:insensitive="true">
+ transform="translate(-357.06525,-236.21351)">
@@ -789,39 +805,39 @@
style="fill:url(#linearGradient5344);fill-opacity:1;stroke:none"
id="rect2936"
width="318.58304"
- height="46.756046"
+ height="46.131046"
x="-556.79657"
- y="358.44128"
- ry="3.4504199"
+ y="357.50378"
+ ry="3.4042974"
inkscape:export-filename="H:\Documents\Hobbies\W433\g9905.png"
inkscape:export-xdpi="88.809998"
inkscape:export-ydpi="88.809998" />
-
+ style="fill:url(#linearGradient3900);fill-opacity:1;stroke:none" />
+
+ transform="translate(-129.62194,129.52019)">
+ style="display:inline"
+ transform="translate(-129.62194,129.52019)">
+ transform="translate(-129.62194,129.52019)">
+ width="34.173222"
+ height="5.9349518"
+ x="136.20108"
+ y="-114.68695"
+ inkscape:label="#rect5246"
+ ry="2.4981377" />
+ transform="translate(-129.62194,129.52019)">
diff --git a/ground/openpilotgcs/src/libs/qwt/qwtconfig.pri b/ground/openpilotgcs/src/libs/qwt/qwtconfig.pri
index 82754c682..bcc921911 100644
--- a/ground/openpilotgcs/src/libs/qwt/qwtconfig.pri
+++ b/ground/openpilotgcs/src/libs/qwt/qwtconfig.pri
@@ -30,6 +30,14 @@ VVERSION = $$[QT_VERSION]
CONFIG += QwtPlot
+######################################################################
+# Build the static/shared libraries.
+# If QwtDll is enabled, a shared library is built, otherwise
+# it will be a static library.
+######################################################################
+
+QWT_CONFIG += QwtDll
+
######################################################################
# QwtWidgets enables all classes, that are needed to use the all other
# widgets (sliders, dials, ...), beside QwtPlot.
diff --git a/ground/openpilotgcs/src/libs/qwt/src/qwt_global.h b/ground/openpilotgcs/src/libs/qwt/src/qwt_global.h
index baf371f49..5fba57e27 100644
--- a/ground/openpilotgcs/src/libs/qwt/src/qwt_global.h
+++ b/ground/openpilotgcs/src/libs/qwt/src/qwt_global.h
@@ -29,17 +29,14 @@
#pragma warning(disable: 4660)
#endif // _MSC_VER
-#ifdef QWT_DLL
#if defined(QWT_MAKEDLL) // create a Qwt DLL library
-#define QWT_EXPORT __declspec(dllexport)
+#define QWT_EXPORT Q_DECL_EXPORT
#define QWT_TEMPLATEDLL
#else // use a Qwt DLL library
-#define QWT_EXPORT __declspec(dllimport)
+#define QWT_EXPORT Q_DECL_IMPORT
#endif
-#endif // QWT_DLL
-
#endif // Q_WS_WIN
#ifndef QWT_EXPORT
diff --git a/ground/openpilotgcs/src/libs/qwt/src/src.pro b/ground/openpilotgcs/src/libs/qwt/src/src.pro
index 133f92b0f..15c1d04e5 100644
--- a/ground/openpilotgcs/src/libs/qwt/src/src.pro
+++ b/ground/openpilotgcs/src/libs/qwt/src/src.pro
@@ -4,9 +4,14 @@ DEFINES += QWT_LIBRARY
include(../../../openpilotgcslibrary.pri)
include( ../qwtconfig.pri )
-#VVERSION = $$[QT_VERSION]
-
+contains(QWT_CONFIG, QwtDll) {
+ CONFIG += dll
+ win32|symbian: DEFINES += QT_DLL QWT_DLL QWT_MAKEDLL
+}
+else {
+ CONFIG += staticlib
+}
HEADERS += \
qwt.h \
qwt_abstract_scale_draw.h \
diff --git a/ground/openpilotgcs/src/plugins/config/cc_hw_settings.ui b/ground/openpilotgcs/src/plugins/config/cc_hw_settings.ui
index 929c9053d..6da1e703a 100644
--- a/ground/openpilotgcs/src/plugins/config/cc_hw_settings.ui
+++ b/ground/openpilotgcs/src/plugins/config/cc_hw_settings.ui
@@ -1,307 +1,303 @@
-
-
- CC_HW_Widget
-
-
-
- 0
- 0
- 517
- 487
-
-
-
- Form
-
-
- -
-
-
- QFrame::StyledPanel
-
-
- QFrame::Raised
-
-
-
-
-
-
-
-
-
-
-
-
- :/configgadget/images/coptercontrol.svg
-
-
- true
-
-
-
- -
-
-
- -
-
-
- -
-
-
- MainPort
-
-
- Qt::AlignBottom|Qt::AlignLeading|Qt::AlignLeft
-
-
-
- -
-
-
-
-
-
-
- -
-
-
- FlexiPort
-
-
- Qt::AlignBottom|Qt::AlignLeading|Qt::AlignLeft
-
-
-
- -
-
-
- Qt::Horizontal
-
-
-
- 40
- 20
-
-
-
-
- -
-
-
- RcvrPort
-
-
- Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
-
-
-
- -
-
-
-
-
- -
-
-
-
-
-
-
-
-
- Telemetry speed:
-
-
-
- -
-
-
-
- 55
- 0
-
-
-
- GPS speed:
-
-
-
- -
-
-
- Select the speed here.
-
-
-
- -
-
-
- Select the speed here.
-
-
-
-
-
- -
-
-
- Qt::Horizontal
-
-
-
- 40
- 20
-
-
-
-
-
-
- -
-
-
- Qt::Vertical
-
-
-
- 20
- 40
-
-
-
-
- -
-
-
-
- 75
- true
-
-
-
-
-
-
- Qt::AutoText
-
-
- true
-
-
-
- -
-
-
-
- 75
- true
-
-
-
- Changes on this page only take effect after board reset or power cycle
-
-
- true
-
-
-
- -
-
-
-
-
-
- Qt::Horizontal
-
-
-
- 40
- 20
-
-
-
-
- -
-
-
-
- 0
- 0
-
-
-
-
- 32
- 32
-
-
-
-
- 32
- 32
-
-
-
-
-
-
-
- :/core/images/helpicon.svg:/core/images/helpicon.svg
-
-
-
- 32
- 32
-
-
-
- true
-
-
-
- -
-
-
- Send to OpenPilot but don't write in SD.
-Beware of not locking yourself out!
-
-
- true
-
-
-
-
-
- Apply
-
-
- false
-
-
-
- -
-
-
- Applies and Saves all settings to SD.
-Beware of not locking yourself out!
-
-
- false
-
-
-
-
-
- Save
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+ CC_HW_Widget
+
+
+
+ 0
+ 0
+ 517
+ 487
+
+
+
+ Form
+
+
+ -
+
+
+ QFrame::StyledPanel
+
+
+ QFrame::Raised
+
+
+
-
+
+
-
+
+
+
+
+
+ true
+
+
+
+ -
+
+
+ -
+
+
+ -
+
+
+ MainPort
+
+
+ Qt::AlignBottom|Qt::AlignLeading|Qt::AlignLeft
+
+
+
+ -
+
+
+
+
+
+
+ -
+
+
+ FlexiPort
+
+
+ Qt::AlignBottom|Qt::AlignLeading|Qt::AlignLeft
+
+
+
+ -
+
+
+ Qt::Horizontal
+
+
+
+ 40
+ 20
+
+
+
+
+ -
+
+
+ RcvrPort
+
+
+ Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
+
+
+
+ -
+
+
+
+
+ -
+
+
-
+
+
-
+
+
+ Telemetry speed:
+
+
+
+ -
+
+
+
+ 55
+ 0
+
+
+
+ GPS speed:
+
+
+
+ -
+
+
+ Select the speed here.
+
+
+
+ -
+
+
+ Select the speed here.
+
+
+
+
+
+ -
+
+
+ Qt::Horizontal
+
+
+
+ 40
+ 20
+
+
+
+
+
+
+ -
+
+
+ Qt::Vertical
+
+
+
+ 20
+ 40
+
+
+
+
+ -
+
+
+
+ 75
+ true
+
+
+
+
+
+
+ Qt::AutoText
+
+
+ true
+
+
+
+ -
+
+
+
+ 75
+ true
+
+
+
+ Changes on this page only take effect after board reset or power cycle
+
+
+ true
+
+
+
+ -
+
+
-
+
+
+ Qt::Horizontal
+
+
+
+ 40
+ 20
+
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+
+ 32
+ 32
+
+
+
+
+ 32
+ 32
+
+
+
+
+
+
+
+ :/core/images/helpicon.svg:/core/images/helpicon.svg
+
+
+
+ 32
+ 32
+
+
+
+ true
+
+
+
+ -
+
+
+ Send to OpenPilot but don't write in SD.
+Beware of not locking yourself out!
+
+
+ true
+
+
+
+
+
+ Apply
+
+
+ false
+
+
+
+ -
+
+
+ Applies and Saves all settings to SD.
+Beware of not locking yourself out!
+
+
+ false
+
+
+
+
+
+ Save
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/ground/openpilotgcs/src/plugins/config/config_cc_hw_widget.cpp b/ground/openpilotgcs/src/plugins/config/config_cc_hw_widget.cpp
index 1d0f723d0..1b8a7eb70 100644
--- a/ground/openpilotgcs/src/plugins/config/config_cc_hw_widget.cpp
+++ b/ground/openpilotgcs/src/plugins/config/config_cc_hw_widget.cpp
@@ -40,6 +40,9 @@ ConfigCCHWWidget::ConfigCCHWWidget(QWidget *parent) : ConfigTaskWidget(parent)
{
m_telemetry = new Ui_CC_HW_Widget();
m_telemetry->setupUi(this);
+
+ m_telemetry->label_2->setPixmap(QPixmap(":/configgadget/images/coptercontrol.svg"));
+
setupButtons(m_telemetry->saveTelemetryToRAM,m_telemetry->saveTelemetryToSD);
addUAVObjectToWidgetRelation("HwSettings","CC_FlexiPort",m_telemetry->cbFlexi);
addUAVObjectToWidgetRelation("HwSettings","CC_MainPort",m_telemetry->cbTele);
diff --git a/ground/openpilotgcs/src/plugins/config/config_cc_hw_widget.h b/ground/openpilotgcs/src/plugins/config/config_cc_hw_widget.h
index f815786fb..7c74043b3 100644
--- a/ground/openpilotgcs/src/plugins/config/config_cc_hw_widget.h
+++ b/ground/openpilotgcs/src/plugins/config/config_cc_hw_widget.h
@@ -50,6 +50,7 @@ private slots:
private:
Ui_CC_HW_Widget *m_telemetry;
+ QSvgRenderer *m_renderer;
};
#endif // CONFIGCCHWWIDGET_H
diff --git a/ground/openpilotgcs/src/plugins/config/configgadget.qrc b/ground/openpilotgcs/src/plugins/config/configgadget.qrc
index 9692603c2..bd9d905c2 100644
--- a/ground/openpilotgcs/src/plugins/config/configgadget.qrc
+++ b/ground/openpilotgcs/src/plugins/config/configgadget.qrc
@@ -16,6 +16,7 @@
images/hw_config.png
images/gyroscope.png
images/TX.svg
+ images/TX2.svg
images/camera.png
images/txpid.png
diff --git a/ground/openpilotgcs/src/plugins/config/configinputwidget.cpp b/ground/openpilotgcs/src/plugins/config/configinputwidget.cpp
index 863104447..4387d10f4 100644
--- a/ground/openpilotgcs/src/plugins/config/configinputwidget.cpp
+++ b/ground/openpilotgcs/src/plugins/config/configinputwidget.cpp
@@ -41,8 +41,8 @@
#include
#include
-#define ACCESS_MIN_MOVE -6
-#define ACCESS_MAX_MOVE 6
+#define ACCESS_MIN_MOVE -3
+#define ACCESS_MAX_MOVE 3
#define STICK_MIN_MOVE -8
#define STICK_MAX_MOVE 8
@@ -108,7 +108,7 @@ ConfigInputWidget::ConfigInputWidget(QWidget *parent) : ConfigTaskWidget(parent)
m_renderer = new QSvgRenderer();
QGraphicsScene *l_scene = m_config->graphicsView->scene();
m_config->graphicsView->setBackgroundBrush(QBrush(Utils::StyleHelper::baseColor()));
- if (QFile::exists(":/configgadget/images/TX.svg") && m_renderer->load(QString(":/configgadget/images/TX.svg")) && m_renderer->isValid())
+ if (QFile::exists(":/configgadget/images/TX2.svg") && m_renderer->load(QString(":/configgadget/images/TX2.svg")) && m_renderer->isValid())
{
l_scene->clear(); // Deletes all items contained in the scene as well.
@@ -401,6 +401,7 @@ void ConfigInputWidget::wizardSetUpStep(enum wizardSteps step)
case wizardChooseMode:
{
m_config->graphicsView->setVisible(true);
+ m_config->graphicsView->fitInView(m_txBackground, Qt::KeepAspectRatio );
setTxMovement(nothing);
m_config->wzText->setText(tr("Please choose your transmiter type.\n"
"Mode 1 means your throttle stick is on the right\n"
@@ -718,7 +719,7 @@ void ConfigInputWidget::identifyControls()
m_config->wzText->clear();
setTxMovement(nothing);
- QTimer::singleShot(500, this, SLOT(wzNext()));
+ QTimer::singleShot(2500, this, SLOT(wzNext()));
}
void ConfigInputWidget::identifyLimits()
diff --git a/ground/openpilotgcs/src/plugins/config/configstabilizationwidget.cpp b/ground/openpilotgcs/src/plugins/config/configstabilizationwidget.cpp
index cbe554f4e..69b0427e3 100644
--- a/ground/openpilotgcs/src/plugins/config/configstabilizationwidget.cpp
+++ b/ground/openpilotgcs/src/plugins/config/configstabilizationwidget.cpp
@@ -42,8 +42,7 @@ ConfigStabilizationWidget::ConfigStabilizationWidget(QWidget *parent) : ConfigTa
m_stabilization = new Ui_StabilizationWidget();
m_stabilization->setupUi(this);
-
- setupButtons(m_stabilization->saveStabilizationToRAM,m_stabilization->saveStabilizationToSD);
+ setupButtons(m_stabilization->saveStabilizationToRAM, m_stabilization->saveStabilizationToSD);
addUAVObject("StabilizationSettings");
@@ -71,8 +70,6 @@ ConfigStabilizationWidget::ConfigStabilizationWidget(QWidget *parent) : ConfigTa
connect(m_stabilization->pitchKi, SIGNAL(valueChanged(double)), this, SLOT(updatePitchKI(double)));
connect(m_stabilization->pitchILimit, SIGNAL(valueChanged(double)), this, SLOT(updatePitchILimit(double)));
- // Connect the help button
- connect(m_stabilization->stabilizationHelp, SIGNAL(clicked()), this, SLOT(openHelp()));
addWidget(m_stabilization->rateRollKp);
addWidget(m_stabilization->rateRollKi);
addWidget(m_stabilization->rateRollILimit);
@@ -102,6 +99,9 @@ ConfigStabilizationWidget::ConfigStabilizationWidget(QWidget *parent) : ConfigTa
addWidget(m_stabilization->maximumYaw);
addWidget(m_stabilization->lowThrottleZeroIntegral);
+ // Connect buttons
+ connect(m_stabilization->stabilizationResetToDefaults, SIGNAL(clicked()), this, SLOT(resetToDefaults()));
+ connect(m_stabilization->stabilizationHelp, SIGNAL(clicked()), this, SLOT(openHelp()));
}
ConfigStabilizationWidget::~ConfigStabilizationWidget()
@@ -195,21 +195,17 @@ void ConfigStabilizationWidget::updatePitchILimit(double val)
}
}
-
/*******************************
* Stabilization Settings
*****************************/
/**
- Request stabilization settings from the board
+ * Refresh UI with new settings of StabilizationSettings object
+ * (either from active configuration or just loaded defaults
+ * to be applied or saved)
*/
-void ConfigStabilizationWidget::refreshWidgetsValues()
+void ConfigStabilizationWidget::refreshUIValues(StabilizationSettings::DataFields &stabData)
{
- bool dirty=isDirty();
- // Not needed anymore as this slot is only called whenever we get
- // a signal that the object was just updated
- // stabSettings->requestUpdate();
- StabilizationSettings::DataFields stabData = stabSettings->getData();
// Now fill in all the fields, this is fairly tedious:
m_stabilization->rateRollKp->setValue(stabData.RollRatePID[StabilizationSettings::ROLLRATEPID_KP]);
m_stabilization->rateRollKi->setValue(stabData.RollRatePID[StabilizationSettings::ROLLRATEPID_KI]);
@@ -247,15 +243,25 @@ void ConfigStabilizationWidget::refreshWidgetsValues()
m_stabilization->maximumPitch->setValue(stabData.MaximumRate[StabilizationSettings::MAXIMUMRATE_PITCH]);
m_stabilization->maximumYaw->setValue(stabData.MaximumRate[StabilizationSettings::MAXIMUMRATE_YAW]);
m_stabilization->lowThrottleZeroIntegral->setChecked(stabData.LowThrottleZeroIntegral==StabilizationSettings::LOWTHROTTLEZEROINTEGRAL_TRUE ? true : false);
-
- setDirty(dirty);
}
+/**
+ Request stabilization settings from the board
+ */
+void ConfigStabilizationWidget::refreshWidgetsValues()
+{
+ bool dirty=isDirty();
+ // Not needed anymore as this slot is only called whenever we get
+ // a signal that the object was just updated
+ // stabSettings->requestUpdate();
+ StabilizationSettings::DataFields stabData = stabSettings->getData();
+ refreshUIValues(stabData);
+ setDirty(dirty);
+}
/**
Send telemetry settings to the board
*/
-
void ConfigStabilizationWidget::updateObjectsFromWidgets()
{
StabilizationSettings::DataFields stabData = stabSettings->getData();
@@ -298,7 +304,6 @@ void ConfigStabilizationWidget::updateObjectsFromWidgets()
stabData.LowThrottleZeroIntegral = (m_stabilization->lowThrottleZeroIntegral->isChecked() ? StabilizationSettings::LOWTHROTTLEZEROINTEGRAL_TRUE :StabilizationSettings::LOWTHROTTLEZEROINTEGRAL_FALSE);
-
stabSettings->setData(stabData); // this is atomic
}
@@ -311,9 +316,16 @@ void ConfigStabilizationWidget::realtimeUpdateToggle(bool state)
}
}
-void ConfigStabilizationWidget::openHelp()
+void ConfigStabilizationWidget::resetToDefaults()
{
-
- QDesktopServices::openUrl( QUrl("http://wiki.openpilot.org/display/Doc/Stabilization+panel", QUrl::StrictMode) );
+ StabilizationSettings stabDefaults;
+ StabilizationSettings::DataFields defaults = stabDefaults.getData();
+ bool dirty=isDirty();
+ refreshUIValues(defaults);
+ setDirty(dirty);
}
+void ConfigStabilizationWidget::openHelp()
+{
+ QDesktopServices::openUrl( QUrl("http://wiki.openpilot.org/display/Doc/Stabilization+panel", QUrl::StrictMode) );
+}
diff --git a/ground/openpilotgcs/src/plugins/config/configstabilizationwidget.h b/ground/openpilotgcs/src/plugins/config/configstabilizationwidget.h
index e512c5097..b502dd25e 100644
--- a/ground/openpilotgcs/src/plugins/config/configstabilizationwidget.h
+++ b/ground/openpilotgcs/src/plugins/config/configstabilizationwidget.h
@@ -49,11 +49,13 @@ private:
Ui_StabilizationWidget *m_stabilization;
StabilizationSettings* stabSettings;
QTimer updateTimer;
+ void refreshUIValues(StabilizationSettings::DataFields &stabData);
private slots:
virtual void refreshWidgetsValues();
void updateObjectsFromWidgets();
void realtimeUpdateToggle(bool);
+ void resetToDefaults();
void openHelp();
void updateRateRollKP(double);
@@ -73,4 +75,4 @@ private slots:
void updatePitchILimit(double);
};
-#endif // ConfigStabilizationWidget_H
+#endif // CONFIGSTABILIZATIONWIDGET_H
diff --git a/ground/openpilotgcs/src/plugins/config/images/TX2.svg b/ground/openpilotgcs/src/plugins/config/images/TX2.svg
new file mode 100644
index 000000000..a6c8a533a
--- /dev/null
+++ b/ground/openpilotgcs/src/plugins/config/images/TX2.svg
@@ -0,0 +1,2852 @@
+
+
+
+
\ No newline at end of file
diff --git a/ground/openpilotgcs/src/plugins/config/input.ui b/ground/openpilotgcs/src/plugins/config/input.ui
index 2fac45ec9..5b591089f 100644
--- a/ground/openpilotgcs/src/plugins/config/input.ui
+++ b/ground/openpilotgcs/src/plugins/config/input.ui
@@ -76,7 +76,7 @@
0
- 70
+ 90
diff --git a/ground/openpilotgcs/src/plugins/config/stabilization.ui b/ground/openpilotgcs/src/plugins/config/stabilization.ui
index 5c2de727e..f99b35b94 100644
--- a/ground/openpilotgcs/src/plugins/config/stabilization.ui
+++ b/ground/openpilotgcs/src/plugins/config/stabilization.ui
@@ -1,772 +1,829 @@
-
-
- StabilizationWidget
-
-
-
- 0
- 0
- 683
- 685
-
-
-
- Form
-
-
- -
-
-
-
- 0
- 1
-
-
-
- QFrame::NoFrame
-
-
- true
-
-
-
-
- 0
- 0
- 665
- 627
-
-
-
-
- 0
- 0
-
-
-
-
- 0
-
-
- 0
-
-
-
-
-
-
- 0
- 0
-
-
-
-
- 0
- 150
-
-
-
- Rate Stabilization Coefficients (Inner Loop)
-
-
-
-
-
-
- Kp
-
-
- Qt::AlignCenter
-
-
-
- -
-
-
- Ki
-
-
- Qt::AlignCenter
-
-
-
- -
-
-
- ILimit
-
-
- Qt::AlignCenter
-
-
-
- -
-
-
- Roll
-
-
-
- -
-
-
- Slowly raise Kp until you start seeing clear oscillations when you fly.
-Then lower the value by 20% or so.
-
-
- 6
-
-
- 0.000100000000000
-
-
-
- -
-
-
- I factor for rate stabilization is usually very low or even zero.
-
-
- 6
-
-
- 0.000100000000000
-
-
-
- -
-
-
- 6
-
-
- 0.000100000000000
-
-
-
- -
-
-
- If checked, the Roll and Pitch factors will be identical.
-When you change one, the other is updated.
-
-
- Link
-
-
-
- -
-
-
- Pitch
-
-
-
- -
-
-
- Slowly raise Kp until you start seeing clear oscillations when you fly.
-Then lower the value by 20% or so.
-
-
- 6
-
-
- 0.000100000000000
-
-
-
- -
-
-
- I factor for rate stabilization is usually very low or even zero.
-
-
- 6
-
-
- 0.000100000000000
-
-
-
- -
-
-
- 6
-
-
- 0.000100000000000
-
-
-
- -
-
-
- Yaw
-
-
-
- -
-
-
- Slowly raise Kp until you start seeing clear oscillations when you fly.
-Then lower the value by 20% or so.
-
-You can usually go for higher values for Yaw factors.
-
-
- 6
-
-
- 0.000100000000000
-
-
-
- -
-
-
- As a rule of thumb, you can set YawRate Ki at roughly the same
-value as YawRate Kp.
-
-
- 6
-
-
- 0.000100000000000
-
-
-
- -
-
-
- 6
-
-
- 0.000100000000000
-
-
-
-
-
-
- -
-
-
- Qt::Vertical
-
-
- QSizePolicy::Fixed
-
-
-
- 20
- 13
-
-
-
-
- -
-
-
-
- 0
- 0
-
-
-
-
- 0
- 150
-
-
-
- Attitude Stabization Coefficients (Outer Loop)
-
-
-
-
-
-
- Once Rate stabilization is done, you should increase the Kp factor until the airframe oscillates again, and go back down 20% or so.
-
-
-
- 6
-
-
- 0.100000000000000
-
-
-
- -
-
-
- Ki can usually be almost identical to Kp.
-
-
- 6
-
-
- 0.100000000000000
-
-
-
- -
-
-
- ILimit can be equal to three to four times Ki, but you can adjust
-depending on whether your airframe is well balanced, and your
-flying style.
-
-
- 6
-
-
- 0.100000000000000
-
-
-
- -
-
-
- Kp
-
-
- Qt::AlignCenter
-
-
-
- -
-
-
- Ki
-
-
- Qt::AlignCenter
-
-
-
- -
-
-
- ILimit
-
-
- Qt::AlignCenter
-
-
-
- -
-
-
- ILimit can be equal to three to four times Ki, but you can adjust
-depending on whether your airframe is well balanced, and your
-flying style.
-
-
- 6
-
-
- 0.100000000000000
-
-
-
- -
-
-
- Ki can usually be almost identical to Kp.
-
-
- 6
-
-
- 0.100000000000000
-
-
-
- -
-
-
- Once Rate stabilization is done, you should increase the Kp factor until the airframe oscillates again, and go back down 20% or so.
-
-
-
- 6
-
-
- 0.100000000000000
-
-
-
- -
-
-
- Once Rate stabilization is done, you should increase the Kp factor until the airframe oscillates again, and go back down 20% or so.
-
-
-
- 6
-
-
- 0.100000000000000
-
-
-
- -
-
-
- Yaw
-
-
-
- -
-
-
- Pitch
-
-
-
- -
-
-
- Roll
-
-
-
- -
-
-
- Ki can usually be almost identical to Kp.
-
-
- 6
-
-
- 0.100000000000000
-
-
-
- -
-
-
- ILimit can be equal to three to four times Ki, but you can adjust
-depending on whether your airframe is well balanced, and your
-flying style.
-
-
- 6
-
-
- 0.100000000000000
-
-
-
- -
-
-
- If checked, the Roll and Pitch factors will be identical.
-When you change one, the other is updated.
-
-
- Link
-
-
-
-
-
-
- -
-
-
- Qt::Vertical
-
-
- QSizePolicy::Fixed
-
-
-
- 20
- 13
-
-
-
-
- -
-
-
-
- 0
- 0
-
-
-
-
- 0
- 0
-
-
-
- Stick range and limits
-
-
-
- QLayout::SetMinAndMaxSize
-
-
-
-
-
- Roll
-
-
- Qt::AlignCenter
-
-
-
- -
-
-
- Pitch
-
-
- Qt::AlignCenter
-
-
-
- -
-
-
- Yaw
-
-
- Qt::AlignCenter
-
-
-
- -
-
-
- 180
-
-
-
- -
-
-
- 180
-
-
-
- -
-
-
- 180
-
-
-
- -
-
-
-
- 150
- 0
-
-
-
-
- 50
- false
-
-
-
- Full stick angle (deg)
-
-
-
- -
-
-
-
- 150
- 0
-
-
-
-
- 50
- false
-
-
-
- Full stick rate (deg/s)
-
-
-
- -
-
-
- 500
-
-
-
- -
-
-
- 500
-
-
-
- -
-
-
- 500
-
-
-
- -
-
-
-
- 150
- 0
-
-
-
-
- 50
- false
-
-
-
-
-
-
- Maximum rate in attitude mode (deg/s)
-
-
-
- -
-
-
- 500
-
-
-
- -
-
-
- 500
-
-
-
- -
-
-
- 500
-
-
-
-
-
-
- -
-
-
- Zero the integral when throttle is low
-
-
-
- -
-
-
- Qt::Vertical
-
-
-
- 20
- 0
-
-
-
-
-
-
-
-
- -
-
-
-
-
-
- If you check this, the GCS will udpate the stabilization factors
-automatically every 300ms, which will help for fast tuning.
-
-
- Update in real time
-
-
-
- -
-
-
- Qt::Horizontal
-
-
-
- 40
- 20
-
-
-
-
- -
-
-
-
- 0
- 0
-
-
-
-
- 32
- 32
-
-
-
-
-
-
-
- :/core/images/helpicon.svg:/core/images/helpicon.svg
-
-
-
- 32
- 32
-
-
-
- true
-
-
-
- -
-
-
- Apply
-
-
-
- -
-
-
- Save
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+ StabilizationWidget
+
+
+
+ 0
+ 0
+ 683
+ 685
+
+
+
+ Form
+
+
+ -
+
+
+
+ 0
+ 1
+
+
+
+ QFrame::NoFrame
+
+
+ true
+
+
+
+
+ 0
+ 0
+ 665
+ 627
+
+
+
+
+ 0
+ 0
+
+
+
+
+ 0
+
+
+ 0
+
+
-
+
+
+
+ 0
+ 0
+
+
+
+
+ 0
+ 150
+
+
+
+ Rate Stabilization Coefficients (Inner Loop)
+
+
+
-
+
+
+ Kp
+
+
+ Qt::AlignCenter
+
+
+
+ -
+
+
+ Ki
+
+
+ Qt::AlignCenter
+
+
+
+ -
+
+
+ ILimit
+
+
+ Qt::AlignCenter
+
+
+
+ -
+
+
+ Roll
+
+
+
+ -
+
+
+ Slowly raise Kp until you start seeing clear oscillations when you fly.
+Then lower the value by 20% or so.
+
+
+ 6
+
+
+ 0.000100000000000
+
+
+
+ -
+
+
+ I factor for rate stabilization is usually very low or even zero.
+
+
+ 6
+
+
+ 0.000100000000000
+
+
+
+ -
+
+
+ 6
+
+
+ 0.000100000000000
+
+
+
+ -
+
+
+ If checked, the Roll and Pitch factors will be identical.
+When you change one, the other is updated.
+
+
+ Link
+
+
+
+ -
+
+
+ Pitch
+
+
+
+ -
+
+
+ Slowly raise Kp until you start seeing clear oscillations when you fly.
+Then lower the value by 20% or so.
+
+
+ 6
+
+
+ 0.000100000000000
+
+
+
+ -
+
+
+ I factor for rate stabilization is usually very low or even zero.
+
+
+ 6
+
+
+ 0.000100000000000
+
+
+
+ -
+
+
+ 6
+
+
+ 0.000100000000000
+
+
+
+ -
+
+
+ Yaw
+
+
+
+ -
+
+
+ Slowly raise Kp until you start seeing clear oscillations when you fly.
+Then lower the value by 20% or so.
+
+You can usually go for higher values for Yaw factors.
+
+
+ 6
+
+
+ 0.000100000000000
+
+
+
+ -
+
+
+ As a rule of thumb, you can set YawRate Ki at roughly the same
+value as YawRate Kp.
+
+
+ 6
+
+
+ 0.000100000000000
+
+
+
+ -
+
+
+ 6
+
+
+ 0.000100000000000
+
+
+
+
+
+
+ -
+
+
+ Qt::Vertical
+
+
+ QSizePolicy::Fixed
+
+
+
+ 20
+ 13
+
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+
+ 0
+ 150
+
+
+
+ Attitude Stabization Coefficients (Outer Loop)
+
+
+
-
+
+
+ Once Rate stabilization is done, you should increase the Kp factor until the airframe oscillates again, and go back down 20% or so.
+
+
+
+ 6
+
+
+ 0.100000000000000
+
+
+
+ -
+
+
+ Ki can usually be almost identical to Kp.
+
+
+ 6
+
+
+ 0.100000000000000
+
+
+
+ -
+
+
+ ILimit can be equal to three to four times Ki, but you can adjust
+depending on whether your airframe is well balanced, and your
+flying style.
+
+
+ 6
+
+
+ 0.100000000000000
+
+
+
+ -
+
+
+ Kp
+
+
+ Qt::AlignCenter
+
+
+
+ -
+
+
+ Ki
+
+
+ Qt::AlignCenter
+
+
+
+ -
+
+
+ ILimit
+
+
+ Qt::AlignCenter
+
+
+
+ -
+
+
+ ILimit can be equal to three to four times Ki, but you can adjust
+depending on whether your airframe is well balanced, and your
+flying style.
+
+
+ 6
+
+
+ 0.100000000000000
+
+
+
+ -
+
+
+ Ki can usually be almost identical to Kp.
+
+
+ 6
+
+
+ 0.100000000000000
+
+
+
+ -
+
+
+ Once Rate stabilization is done, you should increase the Kp factor until the airframe oscillates again, and go back down 20% or so.
+
+
+
+ 6
+
+
+ 0.100000000000000
+
+
+
+ -
+
+
+ Once Rate stabilization is done, you should increase the Kp factor until the airframe oscillates again, and go back down 20% or so.
+
+
+
+ 6
+
+
+ 0.100000000000000
+
+
+
+ -
+
+
+ Yaw
+
+
+
+ -
+
+
+ Pitch
+
+
+
+ -
+
+
+ Roll
+
+
+
+ -
+
+
+ Ki can usually be almost identical to Kp.
+
+
+ 6
+
+
+ 0.100000000000000
+
+
+
+ -
+
+
+ ILimit can be equal to three to four times Ki, but you can adjust
+depending on whether your airframe is well balanced, and your
+flying style.
+
+
+ 6
+
+
+ 0.100000000000000
+
+
+
+ -
+
+
+ If checked, the Roll and Pitch factors will be identical.
+When you change one, the other is updated.
+
+
+ Link
+
+
+
+
+
+
+ -
+
+
+ Qt::Vertical
+
+
+ QSizePolicy::Fixed
+
+
+
+ 20
+ 13
+
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+
+ 0
+ 0
+
+
+
+ Stick range and limits
+
+
+
+ QLayout::SetMinAndMaxSize
+
+
-
+
+
+ Roll
+
+
+ Qt::AlignCenter
+
+
+
+ -
+
+
+ Pitch
+
+
+ Qt::AlignCenter
+
+
+
+ -
+
+
+ Yaw
+
+
+ Qt::AlignCenter
+
+
+
+ -
+
+
+ 180
+
+
+
+ -
+
+
+ 180
+
+
+
+ -
+
+
+ 180
+
+
+
+ -
+
+
+
+ 150
+ 0
+
+
+
+
+ 50
+ false
+
+
+
+ Full stick angle (deg)
+
+
+
+ -
+
+
+
+ 150
+ 0
+
+
+
+
+ 50
+ false
+
+
+
+ Full stick rate (deg/s)
+
+
+
+ -
+
+
+ 500
+
+
+
+ -
+
+
+ 500
+
+
+
+ -
+
+
+ 500
+
+
+
+ -
+
+
+
+ 150
+ 0
+
+
+
+
+ 50
+ false
+
+
+
+
+
+
+ Maximum rate in attitude mode (deg/s)
+
+
+
+ -
+
+
+ 500
+
+
+
+ -
+
+
+ 500
+
+
+
+ -
+
+
+ 500
+
+
+
+
+
+
+ -
+
+
+ Zero the integral when throttle is low
+
+
+
+ -
+
+
+ Qt::Vertical
+
+
+
+ 20
+ 0
+
+
+
+
+
+
+
+
+ -
+
+
-
+
+
+ If you check this, the GCS will udpate the stabilization factors
+automatically every 300ms, which will help for fast tuning.
+
+
+ Update in real time
+
+
+
+ -
+
+
+ Qt::Horizontal
+
+
+
+ 40
+ 20
+
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+
+ 32
+ 32
+
+
+
+
+
+
+
+ :/core/images/helpicon.svg:/core/images/helpicon.svg
+
+
+
+ 32
+ 32
+
+
+
+ true
+
+
+
+ -
+
+
+ Load default Stabilization settings
+
+Loaded settings are not applied automatically. You have to click the
+Apply or Save button afterwards.
+
+
+ Reset To Defaults
+
+
+
+ -
+
+
+ Send settings to the board but do not save to the non-volatile memory
+
+
+ Apply
+
+
+
+ -
+
+
+ Send settings to the board and save to the non-volatile memory
+
+
+ Save
+
+
+
+
+
+
+
+
+ scrollArea
+ rateRollKp
+ rateRollKi
+ rateRollILimit
+ linkRateRP
+ ratePitchKp
+ ratePitchKi
+ ratePitchILimit
+ rateYawKp
+ rateYawKi
+ rateYawILimit
+ rollKp
+ rollKi
+ rollILimit
+ linkAttitudeRP
+ pitchKp
+ pitchKi
+ pitchILimit
+ yawKp
+ yawKi
+ yawILimit
+ rollMax
+ pitchMax
+ yawMax
+ manualRoll
+ manualPitch
+ manualYaw
+ maximumRoll
+ maximumPitch
+ maximumYaw
+ lowThrottleZeroIntegral
+ realTimeUpdates
+ stabilizationHelp
+ stabilizationResetToDefaults
+ saveStabilizationToRAM
+ saveStabilizationToSD
+
+
+
+
+
+
diff --git a/ground/openpilotgcs/src/plugins/coreplugin/OpenPilotGCS.xml b/ground/openpilotgcs/src/plugins/coreplugin/OpenPilotGCS.xml
index fb6187949..7394a661f 100644
--- a/ground/openpilotgcs/src/plugins/coreplugin/OpenPilotGCS.xml
+++ b/ground/openpilotgcs/src/plugins/coreplugin/OpenPilotGCS.xml
@@ -2650,53 +2650,6 @@
UAVGadgetManagerV1
- false
-
-
- OPMapGadget
-
- default
-
- uavGadget
-
-
-
- ModelViewGadget
-
- Test Quad X
-
- uavGadget
-
-
-
- DialGadget
-
- Attitude
-
- uavGadget
-
-
- DialGadget
-
- Compass
-
- uavGadget
-
- 1
- @Variant(AAAACQAAAAA=)
- splitter
-
- 2
- @Variant(AAAACQAAAAIAAAACAAABiwAAAAIAAADs)
- splitter
-
- 1
- @Variant(AAAACQAAAAIAAAACAAAD1AAAAAIAAAGB)
- splitter
-
- UAVGadgetManagerV1
-
-
false
@@ -2751,8 +2704,8 @@
splitter
UAVGadgetManagerV1
-
-
+
+
false
@@ -2822,8 +2775,8 @@
splitter
UAVGadgetManagerV1
-
-
+
+
false
@@ -2869,30 +2822,30 @@
splitter
UAVGadgetManagerV1
-
+
@ByteArray(AAAA/wAAAAD9AAAAAAAABQAAAALCAAAABAAAAAQAAAABAAAACPwAAAAA)
:/core/images/ah.png
- :/core/images/openpilot_logo_64.png
:/core/images/config.png
- :/core/images/world.png
- :/core/images/scopes.png
- :/core/images/joystick.png
- :/core/images/cog.png
+ :/core/images/scopes.png
+ :/core/images/joystick.png
+ :/core/images/cog.png
+ :/core/images/openpilot_logo_64.png
:/core/images/openpilot_logo_64.png
:/core/images/openpilot_logo_64.png
:/core/images/openpilot_logo_64.png
- 6
+ :/core/images/openpilot_logo_64.png
+ 5
Flight data
- Workspace10
Configuration
- Flight Planner
- Scopes
- HITL
- Firmware
+ Scopes
+ HITL
+ Firmware
+ Workspace6
Workspace7
Workspace8
Workspace9
+ Workspace10
diff --git a/ground/openpilotgcs/src/plugins/gcscontrol/images/joystick.svg b/ground/openpilotgcs/src/plugins/gcscontrol/images/joystick.svg
index 386881587..29d5c8762 100644
--- a/ground/openpilotgcs/src/plugins/gcscontrol/images/joystick.svg
+++ b/ground/openpilotgcs/src/plugins/gcscontrol/images/joystick.svg
@@ -1,5 +1,5 @@
-
+
\ No newline at end of file
+ inkscape:version="0.48.1 "
+ sodipodi:docname="joystick.svg">
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/ground/openpilotgcs/src/plugins/gcscontrol/joystickcontrol.cpp b/ground/openpilotgcs/src/plugins/gcscontrol/joystickcontrol.cpp
index d738da556..571b07068 100644
--- a/ground/openpilotgcs/src/plugins/gcscontrol/joystickcontrol.cpp
+++ b/ground/openpilotgcs/src/plugins/gcscontrol/joystickcontrol.cpp
@@ -7,7 +7,7 @@
* @{
* @addtogroup GCSControlGadgetPlugin GCSControl Gadget Plugin
* @{
- * @brief A that mimics a transmitter joystick and updates the MCC
+ * @brief The plugin that mimics a transmitter joystick and updates the MCC
*****************************************************************************/
/*
* This program is free software; you can redistribute it and/or modify
@@ -28,30 +28,24 @@
#include "joystickcontrol.h"
#include "extensionsystem/pluginmanager.h"
#include
-#include
#include
-#include
-#include
-#include
-#include
-#include
#include
-#include
+#include
/**
* @brief Constructor for JoystickControl widget. Sets up the image of a joystick
*/
-JoystickControl::JoystickControl(QWidget *parent) :
- QGraphicsView(parent)
+JoystickControl::JoystickControl(QWidget *parent) : QGraphicsView(parent)
{
- setMinimumSize(64,64);
+ setMinimumSize(64, 64);
setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding);
setScene(new QGraphicsScene(this));
setRenderHints(QPainter::Antialiasing);
m_renderer = new QSvgRenderer();
bool test = m_renderer->load(QString(":/gcscontrol/images/joystick.svg"));
- Q_ASSERT( test );
+ Q_UNUSED(test);
+ Q_ASSERT(test);
m_background = new QGraphicsSvgItem();
m_background->setSharedRenderer(m_renderer);
@@ -60,29 +54,40 @@ JoystickControl::JoystickControl(QWidget *parent) :
m_joystickEnd = new QGraphicsSvgItem();
m_joystickEnd->setSharedRenderer(m_renderer);
m_joystickEnd->setElementId(QString("joystickEnd"));
- m_joystickEnd->setPos(0,0);
+
+ m_joystickArea = new QGraphicsSvgItem();
+ m_joystickArea->setSharedRenderer(m_renderer);
+ m_joystickArea->setElementId(QString("joystickArea"));
+ m_joystickArea->setPos(
+ (m_background->boundingRect().width() - m_joystickArea->boundingRect().width()) * 0.5,
+ (m_background->boundingRect().height() - m_joystickArea->boundingRect().height()) * 0.5
+ );
+ m_joystickArea->setVisible(false);
QGraphicsScene *l_scene = scene();
l_scene->clear(); // This also deletes all items contained in the scene.
l_scene->addItem(m_background);
+ l_scene->addItem(m_joystickArea);
l_scene->addItem(m_joystickEnd);
l_scene->setSceneRect(m_background->boundingRect());
+
+ changePosition(0.0, 0.0);
}
JoystickControl::~JoystickControl()
{
-
+ // Do nothing
}
-/*!
- \brief Enables/Disables OpenGL
+/**
+ * @brief Enables/Disables OpenGL
*/
void JoystickControl::enableOpenGL(bool flag)
{
- if (flag)
- setViewport(new QGLWidget(QGLFormat(QGL::SampleBuffers)));
- else
- setViewport(new QWidget);
+ if (flag)
+ setViewport(new QGLWidget(QGLFormat(QGL::SampleBuffers)));
+ else
+ setViewport(new QWidget);
}
/**
@@ -90,11 +95,12 @@ void JoystickControl::enableOpenGL(bool flag)
*/
void JoystickControl::changePosition(double x, double y)
{
- QRectF sceneSize = scene()->sceneRect();
-
- m_joystickEnd->setPos(
- (x+1) / 2*sceneSize.width() - m_joystickEnd->boundingRect().width() / 2,
- (-y+1) / 2*sceneSize.height() - m_joystickEnd->boundingRect().height() / 2);
+ QRectF areaSize = m_joystickArea->boundingRect();
+ QPointF point(
+ ((1.0 + x) * areaSize.width() - m_joystickEnd->boundingRect().width()) * 0.5,
+ ((1.0 - y) * areaSize.height() - m_joystickEnd->boundingRect().height()) * 0.5
+ );
+ m_joystickEnd->setPos(m_joystickArea->mapToScene(point));
}
/**
@@ -102,17 +108,17 @@ void JoystickControl::changePosition(double x, double y)
*/
void JoystickControl::mouseMoveEvent(QMouseEvent *event)
{
- QPointF point = mapToScene(event->pos());
- QRectF sceneSize = scene()->sceneRect();
+ QPointF point = m_joystickArea->mapFromScene(mapToScene(event->pos()));
+ QSizeF areaSize = m_joystickArea->boundingRect().size();
- double Y = - (point.y() / sceneSize.height() - .5) * 2;
- double X = (point.x() / sceneSize.width() - .5) * 2;
- if (Y<-1) Y = -1;
- if (Y> 1) Y = 1;
- if (X<-1) X = -1;
- if (X> 1) X = 1;
+ double y = - (point.y() / areaSize.height() - 0.5) * 2.0;
+ double x = (point.x() / areaSize.width() - 0.5) * 2.0;
+ if (y < -1.0) y = -1.0;
+ if (y > 1.0) y = 1.0;
+ if (x < -1.0) x = -1.0;
+ if (x > 1.0) x = 1.0;
- emit positionClicked(X, Y);
+ emit positionClicked(x, y);
}
/**
@@ -120,12 +126,11 @@ void JoystickControl::mouseMoveEvent(QMouseEvent *event)
*/
void JoystickControl::mousePressEvent(QMouseEvent *event)
{
- if( event->button() == Qt::LeftButton ) {
+ if (event->button() == Qt::LeftButton) {
mouseMoveEvent(event);
}
}
-
void JoystickControl::paint()
{
update();
@@ -133,9 +138,9 @@ void JoystickControl::paint()
void JoystickControl::paintEvent(QPaintEvent *event)
{
- // Skip painting until the dial file is loaded
- if (! m_renderer->isValid()) {
- qDebug()<<"Image file not loaded, not rendering";
+ // Skip painting until the image file is loaded
+ if (!m_renderer->isValid()) {
+ qDebug() << "Image file not loaded, not rendering";
}
QGraphicsView::paintEvent(event);
@@ -144,10 +149,9 @@ void JoystickControl::paintEvent(QPaintEvent *event)
void JoystickControl::resizeEvent(QResizeEvent *event)
{
Q_UNUSED(event);
- fitInView(m_background, Qt::IgnoreAspectRatio );
+ fitInView(m_background, Qt::KeepAspectRatio);
}
-
/**
* @}
* @}
diff --git a/ground/openpilotgcs/src/plugins/gcscontrol/joystickcontrol.h b/ground/openpilotgcs/src/plugins/gcscontrol/joystickcontrol.h
index 8492474e6..9c6ac59d0 100644
--- a/ground/openpilotgcs/src/plugins/gcscontrol/joystickcontrol.h
+++ b/ground/openpilotgcs/src/plugins/gcscontrol/joystickcontrol.h
@@ -7,7 +7,7 @@
* @{
* @addtogroup GCSControlGadgetPlugin GCSControl Gadget Plugin
* @{
- * @brief A that mimics a transmitter joystick and updates the MCC
+ * @brief The plugin that mimics a transmitter joystick and updates the MCC
*****************************************************************************/
/*
* This program is free software; you can redistribute it and/or modify
@@ -25,7 +25,6 @@
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-
#ifndef JOYSTICKCONTROL_H
#define JOYSTICKCONTROL_H
@@ -46,26 +45,27 @@ class JoystickControl : public QGraphicsView
public:
explicit JoystickControl(QWidget *parent = 0);
~JoystickControl();
- void enableOpenGL(bool flag);
- void paint();
+ void enableOpenGL(bool flag);
+ void paint();
protected:
- void mouseMoveEvent(QMouseEvent *event);
- void mousePressEvent(QMouseEvent *event);
- void paintEvent(QPaintEvent *event);
- void resizeEvent(QResizeEvent *event);
+ void mouseMoveEvent(QMouseEvent *event);
+ void mousePressEvent(QMouseEvent *event);
+ void paintEvent(QPaintEvent *event);
+ void resizeEvent(QResizeEvent *event);
public slots:
- void changePosition (double X, double Y);
+ void changePosition(double x, double y);
signals:
- void positionClicked(double X, double Y);
+ void positionClicked(double x, double y);
private:
QSvgRenderer *m_renderer;
QGraphicsSvgItem *m_background;
+ QGraphicsSvgItem *m_joystickArea;
QGraphicsSvgItem *m_joystickEnd;
- };
+};
#endif // JOYSTICKCONTROL_H
diff --git a/ground/openpilotgcs/src/plugins/uploader/op_dfu.cpp b/ground/openpilotgcs/src/plugins/uploader/op_dfu.cpp
index 961103d22..f30fca1b5 100644
--- a/ground/openpilotgcs/src/plugins/uploader/op_dfu.cpp
+++ b/ground/openpilotgcs/src/plugins/uploader/op_dfu.cpp
@@ -37,6 +37,7 @@ DFUObject::DFUObject(bool _debug,bool _use_serial,QString portname):
debug(_debug),use_serial(_use_serial),mready(true)
{
info = NULL;
+ numberOfDevices = 0;
qRegisterMetaType("Status");
diff --git a/package/osx/libraries b/package/osx/libraries
index 5c87ba15b..fc21721e9 100755
--- a/package/osx/libraries
+++ b/package/osx/libraries
@@ -5,7 +5,7 @@ PLUGINS="${APP}/Contents/Plugins"
OP_PLUGINS="${APP}/Contents/Plugins/OpenPilot"
QT_LIBS="QtGui QtTest QtCore QtSvg QtSql QtOpenGL QtNetwork QtXml QtDBus QtScript phonon"
QT_DIR=$(otool -L "${APP}/Contents/MacOS/OpenPilot GCS" | sed -n -e 's/\/QtCore\.framework.*//p' | sed -n -E 's:^.::p')
-QT_EXTRA="accessible/libqtaccessiblewidgets.dylib bearer/libqgenericbearer.dylib codecs/libqcncodecs.dylib codecs/libqjpcodecs.dylib codecs/libqkrcodecs.dylib codecs/libqtwcodecs.dylib graphicssystems/libqtracegraphicssystem.dylib imageformats/libqgif.dylib imageformats/libqico.dylib imageformats/libqjpeg.dylib imageformats/libqmng.dylib imageformats/libqtiff.dylib qmltooling/libqmldbg_inspector.dylib qmltooling/libqmldbg_tcp.dylib"
+QT_EXTRA="accessible/libqtaccessiblewidgets.dylib bearer/libqgenericbearer.dylib codecs/libqcncodecs.dylib codecs/libqjpcodecs.dylib codecs/libqkrcodecs.dylib codecs/libqtwcodecs.dylib graphicssystems/libqtracegraphicssystem.dylib imageformats/libqgif.dylib imageformats/libqico.dylib imageformats/libqjpeg.dylib imageformats/libqmng.dylib imageformats/libqtiff.dylib imageformats/libqsvg.dylib qmltooling/libqmldbg_inspector.dylib qmltooling/libqmldbg_tcp.dylib"
echo "Qt library directory is \"${QT_DIR}\""
@@ -50,10 +50,21 @@ done
for f in ${QT_EXTRA}
do
+ echo "Copying package ${f}"
+ cp "${QT_DIR}/../plugins/${f}" "${APP}/Contents/Plugins/${f}"
echo "Changing package identification of ${f}"
install_name_tool -id \
@executable_path/../Plugins/${f} \
"${PLUGINS}/${f}"
+
+ echo "Changing package linkages"
+ for g in $QT_LIBS
+ do
+ install_name_tool -change \
+ "${QT_DIR}/${g}.framework/Versions/4/${g}" \
+ @executable_path/../Frameworks/${g}.framework/Versions/4/${g} \
+ "${APP}/Contents/Plugins/${f}"
+ done
done
echo "Copying SDL"