From 3a66f70eaecf0ddf77f299945e14af71be139f43 Mon Sep 17 00:00:00 2001 From: James Cotton Date: Tue, 31 Jan 2012 11:24:19 -0600 Subject: [PATCH 1/5] Input config: Increase the delay after detecting a channel to ask for next one --- ground/openpilotgcs/src/plugins/config/configinputwidget.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ground/openpilotgcs/src/plugins/config/configinputwidget.cpp b/ground/openpilotgcs/src/plugins/config/configinputwidget.cpp index 3e8cf0c87..cc79bc706 100644 --- a/ground/openpilotgcs/src/plugins/config/configinputwidget.cpp +++ b/ground/openpilotgcs/src/plugins/config/configinputwidget.cpp @@ -717,7 +717,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() From d07b386beb09ecb263fe71b77e4351a358b57973 Mon Sep 17 00:00:00 2001 From: James Cotton Date: Tue, 31 Jan 2012 13:09:01 -0600 Subject: [PATCH 2/5] Revert "made the input wizard background transparent" This reverts commit c5a2afcc2c91657b79c0815381a955cd05845f38. --- .../openpilotgcs/src/plugins/config/configinputwidget.cpp | 1 + ground/openpilotgcs/src/plugins/config/input.ui | 6 +----- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/ground/openpilotgcs/src/plugins/config/configinputwidget.cpp b/ground/openpilotgcs/src/plugins/config/configinputwidget.cpp index cc79bc706..3b48e4652 100644 --- a/ground/openpilotgcs/src/plugins/config/configinputwidget.cpp +++ b/ground/openpilotgcs/src/plugins/config/configinputwidget.cpp @@ -107,6 +107,7 @@ ConfigInputWidget::ConfigInputWidget(QWidget *parent) : ConfigTaskWidget(parent) m_config->graphicsView->setViewportUpdateMode(QGraphicsView::FullViewportUpdate); m_renderer = new QSvgRenderer(); QGraphicsScene *l_scene = m_config->graphicsView->scene(); + m_config->graphicsView->setBackgroundBrush(QBrush(Utils::StyleHelper::baseColor())); 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. diff --git a/ground/openpilotgcs/src/plugins/config/input.ui b/ground/openpilotgcs/src/plugins/config/input.ui index 30c0cd80d..2fac45ec9 100644 --- a/ground/openpilotgcs/src/plugins/config/input.ui +++ b/ground/openpilotgcs/src/plugins/config/input.ui @@ -90,11 +90,7 @@ - - - background:transparent - - + From 318354a1151f614d4a3e1a2b9eb79524ca7a84c9 Mon Sep 17 00:00:00 2001 From: James Cotton Date: Tue, 31 Jan 2012 13:31:14 -0600 Subject: [PATCH 3/5] Fix resizing issue with input wizard --- ground/openpilotgcs/src/plugins/config/configinputwidget.cpp | 1 + ground/openpilotgcs/src/plugins/config/input.ui | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/ground/openpilotgcs/src/plugins/config/configinputwidget.cpp b/ground/openpilotgcs/src/plugins/config/configinputwidget.cpp index 3b48e4652..4387d10f4 100644 --- a/ground/openpilotgcs/src/plugins/config/configinputwidget.cpp +++ b/ground/openpilotgcs/src/plugins/config/configinputwidget.cpp @@ -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" 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 From a2979125b7bd40bedd87e7497bc1aeb83734db86 Mon Sep 17 00:00:00 2001 From: James Cotton Date: Tue, 31 Jan 2012 14:11:04 -0600 Subject: [PATCH 4/5] Remove the hardcoded .svg from the QLabel and load it dynamically. This will be useful for CC3D. --- .../src/plugins/config/cc_hw_settings.ui | 610 +++++++++--------- .../plugins/config/config_cc_hw_widget.cpp | 3 + 2 files changed, 306 insertions(+), 307 deletions(-) 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); From 7990d209a8e13559964e0435d772e3de33ee6166 Mon Sep 17 00:00:00 2001 From: James Cotton Date: Tue, 31 Jan 2012 14:46:58 -0600 Subject: [PATCH 5/5] Fix package deployment script for OSX to make sure the SVG pixmap shows up --- .../src/plugins/config/config_cc_hw_widget.h | 1 + package/osx/libraries | 13 ++++++++++++- 2 files changed, 13 insertions(+), 1 deletion(-) 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/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"