From 7f5c9b6c4346aea06d8f3c49d23314cda0ade2d0 Mon Sep 17 00:00:00 2001 From: zedamota Date: Fri, 27 May 2011 11:49:15 +0100 Subject: [PATCH 1/6] Cosmetic changes to Uploader Gadget Rescue mode --- .../plugins/uploader/uploadergadgetwidget.cpp | 222 ++++++++++-------- .../plugins/uploader/uploadergadgetwidget.h | 10 +- 2 files changed, 128 insertions(+), 104 deletions(-) diff --git a/ground/openpilotgcs/src/plugins/uploader/uploadergadgetwidget.cpp b/ground/openpilotgcs/src/plugins/uploader/uploadergadgetwidget.cpp index 2943bcdfd..5a4b350b2 100755 --- a/ground/openpilotgcs/src/plugins/uploader/uploadergadgetwidget.cpp +++ b/ground/openpilotgcs/src/plugins/uploader/uploadergadgetwidget.cpp @@ -33,7 +33,6 @@ UploaderGadgetWidget::UploaderGadgetWidget(QWidget *parent) : QWidget(parent) m_config = new Ui_UploaderWidget(); m_config->setupUi(this); currentStep = IAP_STATE_READY; - rescueStep = RESCUE_STEP0; resetOnly=false; dfu = NULL; @@ -393,89 +392,93 @@ void UploaderGadgetWidget::systemBoot() void UploaderGadgetWidget::systemRescue() { Core::ConnectionManager *cm = Core::ICore::instance()->connectionManager(); - switch (rescueStep) { - case RESCUE_STEP0: { - cm->disconnectDevice(); - // stop the polling thread: otherwise it will mess up DFU - cm->suspendPolling(); - // Delete all previous tabs: - while (m_config->systemElements->count()) { - QWidget *qw = m_config->systemElements->widget(0); - m_config->systemElements->removeTab(0); - delete qw; - } - // Existing DFU objects will have a handle over USB and will - // disturb everything for the rescue process: - if (dfu) { - delete dfu; - dfu = NULL; - } - // Avoid dumb users pressing Rescue twice. It can happen. - m_config->rescueButton->setEnabled(false); - - // Now we're good to go: - clearLog(); - log("**********************************************************"); - log("** Follow those instructions to attempt a system rescue **"); - log("**********************************************************"); - log("You will be prompted to first connect USB, then system power"); - log ("Connect USB in 2 seconds..."); - rescueStep = RESCUE_STEP1; - QTimer::singleShot(1000, this, SLOT(systemRescue())); + cm->disconnectDevice(); + // stop the polling thread: otherwise it will mess up DFU + cm->suspendPolling(); + // Delete all previous tabs: + while (m_config->systemElements->count()) { + QWidget *qw = m_config->systemElements->widget(0); + m_config->systemElements->removeTab(0); + delete qw; } - break; - case RESCUE_STEP1: - rescueStep = RESCUE_STEP2; - log (" ...1..."); - QTimer::singleShot(1000, this, SLOT(systemRescue())); - break; - case RESCUE_STEP2: - rescueStep = RESCUE_STEP3; - log(" ...Now!"); - QTimer::singleShot(1000, this, SLOT(systemRescue())); - break; - case RESCUE_STEP3: - log("... Detecting First Board..."); - repaint(); - dfu = new DFUObject(DFU_DEBUG, false, QString()); - dfu->AbortOperation(); - if(!dfu->enterDFU(0)) + // Existing DFU objects will have a handle over USB and will + // disturb everything for the rescue process: + if (dfu) { + delete dfu; + dfu = NULL; + } + // Avoid dumb users pressing Rescue twice. It can happen. + m_config->rescueButton->setEnabled(false); + + // Now we're good to go: + clearLog(); + log("**********************************************************"); + log("** Follow those instructions to attempt a system rescue **"); + log("**********************************************************"); + log("You will be prompted to first connect USB, then system power"); + if(USBMonitor::instance()->availableDevices(0x20a0,-1,-1,-1).length()>0) + { + if(QMessageBox::warning(this,tr("OpenPilot Uploader"),tr("Please disconnect all openpilot boards"),QMessageBox::Ok,QMessageBox::Cancel)==QMessageBox::Cancel) { - rescueStep = RESCUE_STEP0; - log("Could not enter DFU mode."); - delete dfu; - dfu = NULL; - cm->resumePolling(); m_config->rescueButton->setEnabled(true); return; } - if(!dfu->findDevices() || (dfu->numberOfDevices != 1)) - { - rescueStep = RESCUE_STEP0; - log("Could not detect a board, aborting!"); - delete dfu; - dfu = NULL; - cm->resumePolling(); - m_config->rescueButton->setEnabled(true); - return; - } - rescueStep = RESCUE_POWER1; - log("Connect Power in 2 second..."); - log("(not required on CopterControl)"); - QTimer::singleShot(1000, this, SLOT(systemRescue())); - break; - case RESCUE_POWER1: - rescueStep = RESCUE_POWER2; - log(" ...1..."); - QTimer::singleShot(1000, this, SLOT(systemRescue())); - break; - case RESCUE_POWER2: - log("... NOW!\n***\nWaiting..."); - rescueStep = RESCUE_DETECT; - QTimer::singleShot(5000, this, SLOT(systemRescue())); - break; - case RESCUE_DETECT: - rescueStep = RESCUE_STEP0; + } + // Now we're good to go: + clearLog(); + log("**********************************************************"); + log("** Follow those instructions to attempt a system rescue **"); + log("**********************************************************"); + log("You will be prompted to first connect USB, then system power"); + pd = new QProgressDialog(tr("Please connect the board (USB only!)"), tr("Cancel"), 0, 20); + QProgressBar * bar=new QProgressBar(pd); + bar->setFormat("Timeout"); + pd->setBar(bar); + pd->setMinimumDuration(0); + pd->setRange(0,20); + connect(pd, SIGNAL(canceled()), this, SLOT(cancel())); + t = new QTimer(this); + connect(t, SIGNAL(timeout()), this, SLOT(perform())); + t->start(1000); + connect(USBMonitor::instance(), SIGNAL(deviceDiscovered(USBPortInfo)),&q, SLOT(quit())); + q.exec(); + if(!t->isActive()) + { + pd->close(); + t->stop(); + QMessageBox::warning(this,tr("Openpilot Uploader"),tr("No board connection was detected!")); + m_config->rescueButton->setEnabled(true); + return; + } + pd->close(); + t->stop(); + log("... Detecting First Board..."); + repaint(); + dfu = new DFUObject(DFU_DEBUG, false, QString()); + dfu->AbortOperation(); + if(!dfu->enterDFU(0)) + { + log("Could not enter DFU mode."); + delete dfu; + dfu = NULL; + cm->resumePolling(); + m_config->rescueButton->setEnabled(true); + return; + } + if(!dfu->findDevices() || (dfu->numberOfDevices != 1)) + { + log("Could not detect a board, aborting!"); + delete dfu; + dfu = NULL; + cm->resumePolling(); + m_config->rescueButton->setEnabled(true); + return; + } + if(QMessageBox::question(this,tr("OpenPilot Uploader"),tr("If you want to search for other boards connect power now and press Yes"),QMessageBox::Yes,QMessageBox::No)==QMessageBox::Yes) + { + log("\nWaiting..."); + QTimer::singleShot(3000, &q, SLOT(quit())); + q.exec(); log("Detecting second board..."); repaint(); if(!dfu->findDevices()) @@ -489,28 +492,42 @@ void UploaderGadgetWidget::systemRescue() m_config->rescueButton->setEnabled(true); return; } - log(QString("Found ") + QString::number(dfu->numberOfDevices) + QString(" device(s).")); - if (dfu->numberOfDevices > 5) { - log("Inconsistent number of devices, aborting!"); - delete dfu; - dfu = NULL; - cm->resumePolling(); - m_config->rescueButton->setEnabled(true); - return; - } - for(int i=0;inumberOfDevices;i++) { - deviceWidget* dw = new deviceWidget(this); - dw->setDeviceID(i); - dw->setDfu(dfu); - dw->populate(); - m_config->systemElements->addTab(dw, QString("Device") + QString::number(i)); - } - m_config->haltButton->setEnabled(false); - m_config->resetButton->setEnabled(false); - m_config->bootButton->setEnabled(true); - m_config->rescueButton->setEnabled(false); - currentStep = IAP_STATE_BOOTLOADER; // So that we can boot from the GUI afterwards. } + log(QString("Found ") + QString::number(dfu->numberOfDevices) + QString(" device(s).")); + if (dfu->numberOfDevices > 5) { + log("Inconsistent number of devices, aborting!"); + delete dfu; + dfu = NULL; + cm->resumePolling(); + m_config->rescueButton->setEnabled(true); + return; + } + for(int i=0;inumberOfDevices;i++) { + deviceWidget* dw = new deviceWidget(this); + dw->setDeviceID(i); + dw->setDfu(dfu); + dw->populate(); + m_config->systemElements->addTab(dw, QString("Device") + QString::number(i)); + } + m_config->haltButton->setEnabled(false); + m_config->resetButton->setEnabled(false); + m_config->bootButton->setEnabled(true); + m_config->rescueButton->setEnabled(false); + currentStep = IAP_STATE_BOOTLOADER; // So that we can boot from the GUI afterwards. +} +void UploaderGadgetWidget::perform() +{ + if(pd->value()==19) + { + t->stop(); + q.exit(); + } + pd->setValue(pd->value()+1); +} +void UploaderGadgetWidget::cancel() +{ + t->stop(); + q.exit(); } /** @@ -538,6 +555,11 @@ UploaderGadgetWidget::~UploaderGadgetWidget() m_config->systemElements->removeTab(0); delete qw; } + if (pd) + delete pd; + if (t) + delete t; + } diff --git a/ground/openpilotgcs/src/plugins/uploader/uploadergadgetwidget.h b/ground/openpilotgcs/src/plugins/uploader/uploadergadgetwidget.h index 7c7bae19e..b629ad605 100755 --- a/ground/openpilotgcs/src/plugins/uploader/uploadergadgetwidget.h +++ b/ground/openpilotgcs/src/plugins/uploader/uploadergadgetwidget.h @@ -53,6 +53,7 @@ #include #include +#include using namespace OP_DFU; @@ -64,7 +65,6 @@ public: UploaderGadgetWidget(QWidget *parent = 0); ~UploaderGadgetWidget(); typedef enum { IAP_STATE_READY, IAP_STATE_STEP_1, IAP_STATE_STEP_2, IAP_STEP_RESET, IAP_STATE_BOOTLOADER} IAPStep; - typedef enum { RESCUE_STEP0, RESCUE_STEP1, RESCUE_STEP2, RESCUE_STEP3, RESCUE_POWER1, RESCUE_POWER2, RESCUE_DETECT } RescueStep; void log(QString str); public slots: @@ -75,13 +75,13 @@ private: Ui_UploaderWidget *m_config; DFUObject *dfu; IAPStep currentStep; - RescueStep rescueStep; bool resetOnly; void clearLog(); QString getPortDevice(const QString &friendName); - + QProgressDialog* pd; + QTimer* t; QLineEdit* openFileNameLE; - + QEventLoop q; private slots: void error(QString errorString,int errorNumber); void info(QString infoString,int infoNumber); @@ -90,6 +90,8 @@ private slots: void systemBoot(); void systemRescue(); void getSerialPorts(); + void perform(); + void cancel(); }; From ba4a060c273c9e7646d3061e3c1237f5872d9431 Mon Sep 17 00:00:00 2001 From: PeterG Date: Sun, 29 May 2011 09:23:20 +0200 Subject: [PATCH 2/6] Changes to allow icons to be displayed for gadgets in the options page and in the gadget dropdown list. Also, allow gadgets to have exactly one configuration only, which gives them a bit more real estate in the options page. For gadgets to use this, call functions setIcon(QIcon) and setSingleConfigurationGadgetTrue() in the constructor of the gadget factory, e.g.: SystemHealthGadgetFactory::SystemHealthGadgetFactory(QObject *parent) : IUAVGadgetFactory(QString("SystemHealthGadget"), tr("System Health Gadget"), parent) { setSingleConfigurationGadgetTrue(); setIcon(QIcon(":/core/images/openpilot_logo_64.png")); } --- .../plugins/coreplugin/dialogs/ioptionspage.h | 10 +++++++++- .../coreplugin/dialogs/settingsdialog.cpp | 2 ++ .../plugins/coreplugin/iuavgadgetfactory.h | 12 +++++++++++- .../coreplugin/uavgadgetinstancemanager.cpp | 19 ++++++++++++++----- .../coreplugin/uavgadgetinstancemanager.h | 7 +++++-- .../uavgadgetmanager/uavgadgetview.cpp | 2 ++ .../uavgadgetoptionspagedecorator.cpp | 9 ++++++++- .../uavgadgetoptionspagedecorator.h | 3 ++- 8 files changed, 53 insertions(+), 11 deletions(-) diff --git a/ground/openpilotgcs/src/plugins/coreplugin/dialogs/ioptionspage.h b/ground/openpilotgcs/src/plugins/coreplugin/dialogs/ioptionspage.h index 1f470b97c..21a299508 100644 --- a/ground/openpilotgcs/src/plugins/coreplugin/dialogs/ioptionspage.h +++ b/ground/openpilotgcs/src/plugins/coreplugin/dialogs/ioptionspage.h @@ -32,6 +32,7 @@ #include #include +#include QT_BEGIN_NAMESPACE class QWidget; @@ -43,9 +44,14 @@ class CORE_EXPORT IOptionsPage : public QObject { Q_OBJECT public: - IOptionsPage(QObject *parent = 0) : QObject(parent) {} + IOptionsPage(QObject *parent = 0) : + QObject(parent), + m_icon(QIcon()) {} virtual ~IOptionsPage() {} + void setIcon(QIcon icon) { m_icon = icon; } + QIcon icon() { return m_icon; } + /* gadget options pages can leave these 4 functions as is, since they are decorated by UAVGadgetOptionsPageDecorator, all other options pages must override these */ @@ -57,6 +63,8 @@ public: virtual QWidget *createPage(QWidget *parent) = 0; virtual void apply() = 0; virtual void finish() = 0; +private: + QIcon m_icon; }; } // namespace Core diff --git a/ground/openpilotgcs/src/plugins/coreplugin/dialogs/settingsdialog.cpp b/ground/openpilotgcs/src/plugins/coreplugin/dialogs/settingsdialog.cpp index 5e77125f0..413cdb63b 100644 --- a/ground/openpilotgcs/src/plugins/coreplugin/dialogs/settingsdialog.cpp +++ b/ground/openpilotgcs/src/plugins/coreplugin/dialogs/settingsdialog.cpp @@ -114,6 +114,7 @@ SettingsDialog::SettingsDialog(QWidget *parent, const QString &categoryId, splitter->setCollapsible(0, false); splitter->setCollapsible(1, false); pageTree->header()->setVisible(false); +// pageTree->setIconSize(QSize(24, 24)); connect(pageTree, SIGNAL(currentItemChanged(QTreeWidgetItem *, QTreeWidgetItem *)), this, SLOT(pageSelected())); @@ -150,6 +151,7 @@ SettingsDialog::SettingsDialog(QWidget *parent, const QString &categoryId, } } categoryItem = new QTreeWidgetItem(pageTree); + categoryItem->setIcon(0, page->icon()); categoryItem->setText(0, trCategories); categoryItem->setData(0, Qt::UserRole, qVariantFromValue(pageData)); categories.insert(currentCategory, categoryItem); diff --git a/ground/openpilotgcs/src/plugins/coreplugin/iuavgadgetfactory.h b/ground/openpilotgcs/src/plugins/coreplugin/iuavgadgetfactory.h index 96fed8b28..5b8029241 100644 --- a/ground/openpilotgcs/src/plugins/coreplugin/iuavgadgetfactory.h +++ b/ground/openpilotgcs/src/plugins/coreplugin/iuavgadgetfactory.h @@ -31,6 +31,7 @@ #include "core_global.h" #include +#include #include #include "uavconfiginfo.h" @@ -51,7 +52,9 @@ public: IUAVGadgetFactory(QString classId, QString name, QObject *parent = 0) : QObject(parent), m_classId(classId), - m_name(name) {} + m_name(name), + m_icon(QIcon()), + m_singleConfigurationGadget(false) {} virtual ~IUAVGadgetFactory() {} virtual IUAVGadget *createGadget(QWidget *parent) = 0; @@ -60,9 +63,16 @@ public: virtual IOptionsPage *createOptionsPage(IUAVGadgetConfiguration */*config*/) { return 0; } QString classId() const { return m_classId; } QString name() const { return m_name; } + QIcon icon() const { return m_icon; } + bool isSingleConfigurationGadget() { return m_singleConfigurationGadget; } +protected: + void setIcon(QIcon icon) { m_icon = icon; } + void setSingleConfigurationGadgetTrue() { m_singleConfigurationGadget = true; } private: QString m_classId; // unique class id QString m_name; // display name, should also be unique + QIcon m_icon; + bool m_singleConfigurationGadget; // true if there is exactly one configuration for this gadget }; } // namespace Core diff --git a/ground/openpilotgcs/src/plugins/coreplugin/uavgadgetinstancemanager.cpp b/ground/openpilotgcs/src/plugins/coreplugin/uavgadgetinstancemanager.cpp index f93e5cb60..55dc239a8 100644 --- a/ground/openpilotgcs/src/plugins/coreplugin/uavgadgetinstancemanager.cpp +++ b/ground/openpilotgcs/src/plugins/coreplugin/uavgadgetinstancemanager.cpp @@ -56,7 +56,9 @@ UAVGadgetInstanceManager::UAVGadgetInstanceManager(QObject *parent) : m_factories.append(f); QString classId = f->classId(); QString name = f->name(); - m_classIds.insert(classId, name); + QIcon icon = f->icon(); + m_classIdNameMap.insert(classId, name); + m_classIdIconMap.insert(classId, icon); } } } @@ -108,7 +110,7 @@ void UAVGadgetInstanceManager::readConfigs_1_2_0(QSettings *qs) { UAVConfigInfo configInfo; - foreach (QString classId, m_classIds.keys()) + foreach (QString classId, m_classIdNameMap.keys()) { IUAVGadgetFactory *f = factory(classId); qs->beginGroup(classId); @@ -159,7 +161,7 @@ void UAVGadgetInstanceManager::readConfigs_1_1_0(QSettings *qs) { UAVConfigInfo configInfo; - foreach (QString classId, m_classIds.keys()) + foreach (QString classId, m_classIdNameMap.keys()) { IUAVGadgetFactory *f = factory(classId); qs->beginGroup(classId); @@ -242,7 +244,8 @@ void UAVGadgetInstanceManager::createOptionsPages() IUAVGadgetFactory *f = factory(config->classId()); IOptionsPage *p = f->createOptionsPage(config); if (p) { - IOptionsPage *page = new UAVGadgetOptionsPageDecorator(p, config); + IOptionsPage *page = new UAVGadgetOptionsPageDecorator(p, config, f->isSingleConfigurationGadget()); + page->setIcon(f->icon()); m_optionsPages.append(page); m_pm->addObject(page); } @@ -334,6 +337,7 @@ void UAVGadgetInstanceManager::cloneConfiguration(IUAVGadgetConfiguration *conf IUAVGadgetFactory *f = factory(config->classId()); IOptionsPage *p = f->createOptionsPage(config); IOptionsPage *page = new UAVGadgetOptionsPageDecorator(p, config); + page->setIcon(f->icon()); m_provisionalConfigs.append(config); m_provisionalOptionsPages.append(page); m_settingsDialog->insertPage(page); @@ -452,7 +456,12 @@ QStringList UAVGadgetInstanceManager::configurationNames(QString classId) const QString UAVGadgetInstanceManager::gadgetName(QString classId) const { - return m_classIds.value(classId); + return m_classIdNameMap.value(classId); +} + +QIcon UAVGadgetInstanceManager::gadgetIcon(QString classId) const +{ + return m_classIdIconMap.value(classId); } IUAVGadgetFactory *UAVGadgetInstanceManager::factory(QString classId) const diff --git a/ground/openpilotgcs/src/plugins/coreplugin/uavgadgetinstancemanager.h b/ground/openpilotgcs/src/plugins/coreplugin/uavgadgetinstancemanager.h index 1b8f574ee..fab30f284 100644 --- a/ground/openpilotgcs/src/plugins/coreplugin/uavgadgetinstancemanager.h +++ b/ground/openpilotgcs/src/plugins/coreplugin/uavgadgetinstancemanager.h @@ -32,6 +32,7 @@ #include #include #include +#include #include "core_global.h" #include "uavconfiginfo.h" @@ -68,9 +69,10 @@ public: void cloneConfiguration(IUAVGadgetConfiguration *config); void applyChanges(IUAVGadgetConfiguration *config); void configurationNameEdited(QString text, bool hasText = true); - QStringList classIds() const { return m_classIds.keys(); } + QStringList classIds() const { return m_classIdNameMap.keys(); } QStringList configurationNames(QString classId) const; QString gadgetName(QString classId) const; + QIcon gadgetIcon(QString classId) const; signals: void configurationChanged(IUAVGadgetConfiguration* config); @@ -91,7 +93,8 @@ private: QList m_factories; QList m_configurations; QList m_optionsPages; - QMap m_classIds; + QMap m_classIdNameMap; + QMap m_classIdIconMap; QMap m_takenNames; QList m_provisionalConfigs; QList m_provisionalDeletes; diff --git a/ground/openpilotgcs/src/plugins/coreplugin/uavgadgetmanager/uavgadgetview.cpp b/ground/openpilotgcs/src/plugins/coreplugin/uavgadgetmanager/uavgadgetview.cpp index a86b52d17..13b2b3062 100644 --- a/ground/openpilotgcs/src/plugins/coreplugin/uavgadgetmanager/uavgadgetview.cpp +++ b/ground/openpilotgcs/src/plugins/coreplugin/uavgadgetmanager/uavgadgetview.cpp @@ -91,6 +91,7 @@ UAVGadgetView::UAVGadgetView(Core::UAVGadgetManager *uavGadgetManager, IUAVGadge m_defaultIndex = 0; startFromOne = true; m_uavGadgetList->insertItem(0, im->gadgetName(classId), classId); + m_uavGadgetList->setItemIcon(0, im->gadgetIcon(classId)); m_uavGadgetList->insertSeparator(1); } else { @@ -101,6 +102,7 @@ UAVGadgetView::UAVGadgetView(Core::UAVGadgetManager *uavGadgetManager, IUAVGadge break; } m_uavGadgetList->insertItem(i, im->gadgetName(classId), classId); + m_uavGadgetList->setItemIcon(i, im->gadgetIcon(classId)); } ++index; } diff --git a/ground/openpilotgcs/src/plugins/coreplugin/uavgadgetoptionspagedecorator.cpp b/ground/openpilotgcs/src/plugins/coreplugin/uavgadgetoptionspagedecorator.cpp index d5fc1b054..f95f7e4c1 100644 --- a/ground/openpilotgcs/src/plugins/coreplugin/uavgadgetoptionspagedecorator.cpp +++ b/ground/openpilotgcs/src/plugins/coreplugin/uavgadgetoptionspagedecorator.cpp @@ -34,10 +34,12 @@ using namespace Core; -UAVGadgetOptionsPageDecorator::UAVGadgetOptionsPageDecorator(IOptionsPage *page, IUAVGadgetConfiguration *config, QObject *parent) : +UAVGadgetOptionsPageDecorator::UAVGadgetOptionsPageDecorator(IOptionsPage *page, IUAVGadgetConfiguration *config, + bool isSingleConfigurationGadget, QObject *parent) : Core::IOptionsPage(parent), m_optionsPage(page), m_config(config), + m_isSingleConfigurationGadget(isSingleConfigurationGadget), m_id(config->name()), m_category(config->classId()) { @@ -65,6 +67,11 @@ QWidget *UAVGadgetOptionsPageDecorator::createPage(QWidget *parent) wi->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding); m_page->verticalLayout_4->addWidget(wi); + // For some gadgets it might not make sense to have multiple configurations + if (m_isSingleConfigurationGadget) { + m_page->configurationBox->hide(); + } + connect(m_page->cloneButton, SIGNAL(clicked()), this, SLOT(cloneConfiguration())); connect(m_page->deleteButton, SIGNAL(clicked()), this, SLOT(deleteConfiguration())); connect(m_page->nameLineEdit, SIGNAL(textEdited(QString)), this, SLOT(textEdited(QString))); diff --git a/ground/openpilotgcs/src/plugins/coreplugin/uavgadgetoptionspagedecorator.h b/ground/openpilotgcs/src/plugins/coreplugin/uavgadgetoptionspagedecorator.h index 919a8c510..14ec5bf39 100644 --- a/ground/openpilotgcs/src/plugins/coreplugin/uavgadgetoptionspagedecorator.h +++ b/ground/openpilotgcs/src/plugins/coreplugin/uavgadgetoptionspagedecorator.h @@ -43,7 +43,7 @@ class CORE_EXPORT UAVGadgetOptionsPageDecorator : public Core::IOptionsPage { Q_OBJECT public: - explicit UAVGadgetOptionsPageDecorator(IOptionsPage *page, IUAVGadgetConfiguration *config, QObject *parent = 0); + explicit UAVGadgetOptionsPageDecorator(IOptionsPage *page, IUAVGadgetConfiguration *config, bool isSingleConfigurationGadget = false, QObject *parent = 0); QString id() const { return m_id; } QString trName() const { return m_id; } @@ -66,6 +66,7 @@ private slots: private: IOptionsPage *m_optionsPage; IUAVGadgetConfiguration *m_config; + bool m_isSingleConfigurationGadget; UAVGadgetInstanceManager *m_instanceManager; QString m_id; QString m_category; From 3a7f8c7fc5bd6afc2e464f38da4c3b7ec7984e13 Mon Sep 17 00:00:00 2001 From: PeterG Date: Sun, 29 May 2011 09:42:26 +0200 Subject: [PATCH 3/6] Remove empty options pages for config, pipxtreme and uploader gadgets. --- .../openpilotgcs/src/plugins/config/configgadgetfactory.cpp | 5 ----- ground/openpilotgcs/src/plugins/config/configgadgetfactory.h | 1 - .../src/plugins/pipxtreme/pipxtremegadgetfactory.cpp | 5 ----- .../src/plugins/pipxtreme/pipxtremegadgetfactory.h | 1 - .../src/plugins/uploader/uploadergadgetfactory.cpp | 5 ----- .../src/plugins/uploader/uploadergadgetfactory.h | 1 - 6 files changed, 18 deletions(-) diff --git a/ground/openpilotgcs/src/plugins/config/configgadgetfactory.cpp b/ground/openpilotgcs/src/plugins/config/configgadgetfactory.cpp index 37447b01a..1c1cb9ae5 100644 --- a/ground/openpilotgcs/src/plugins/config/configgadgetfactory.cpp +++ b/ground/openpilotgcs/src/plugins/config/configgadgetfactory.cpp @@ -50,8 +50,3 @@ IUAVGadgetConfiguration *ConfigGadgetFactory::createConfiguration(QSettings* qSe { return new ConfigGadgetConfiguration(QString("ConfigGadget"), qSettings); } - -IOptionsPage *ConfigGadgetFactory::createOptionsPage(IUAVGadgetConfiguration *config) -{ - return new ConfigGadgetOptionsPage(qobject_cast(config)); -} diff --git a/ground/openpilotgcs/src/plugins/config/configgadgetfactory.h b/ground/openpilotgcs/src/plugins/config/configgadgetfactory.h index 8d371e746..de90e6def 100644 --- a/ground/openpilotgcs/src/plugins/config/configgadgetfactory.h +++ b/ground/openpilotgcs/src/plugins/config/configgadgetfactory.h @@ -46,7 +46,6 @@ public: IUAVGadget *createGadget(QWidget *parent); IUAVGadgetConfiguration *createConfiguration(QSettings* qSettings); - IOptionsPage *createOptionsPage(IUAVGadgetConfiguration *config); }; #endif // CONFIGGADGETFACTORY_H diff --git a/ground/openpilotgcs/src/plugins/pipxtreme/pipxtremegadgetfactory.cpp b/ground/openpilotgcs/src/plugins/pipxtreme/pipxtremegadgetfactory.cpp index 42ce2ec91..01c16435c 100644 --- a/ground/openpilotgcs/src/plugins/pipxtreme/pipxtremegadgetfactory.cpp +++ b/ground/openpilotgcs/src/plugins/pipxtreme/pipxtremegadgetfactory.cpp @@ -49,8 +49,3 @@ IUAVGadgetConfiguration * PipXtremeGadgetFactory::createConfiguration(QSettings { return new PipXtremeGadgetConfiguration(QString("PipXtreme"), qSettings); } - -IOptionsPage * PipXtremeGadgetFactory::createOptionsPage(IUAVGadgetConfiguration *config) -{ - return new PipXtremeGadgetOptionsPage(qobject_cast(config)); -} diff --git a/ground/openpilotgcs/src/plugins/pipxtreme/pipxtremegadgetfactory.h b/ground/openpilotgcs/src/plugins/pipxtreme/pipxtremegadgetfactory.h index d6d2bf736..8bd48f46b 100644 --- a/ground/openpilotgcs/src/plugins/pipxtreme/pipxtremegadgetfactory.h +++ b/ground/openpilotgcs/src/plugins/pipxtreme/pipxtremegadgetfactory.h @@ -45,7 +45,6 @@ public: Core::IUAVGadget * createGadget(QWidget *parent); IUAVGadgetConfiguration * createConfiguration(QSettings *qSettings); - IOptionsPage * createOptionsPage(IUAVGadgetConfiguration *config); }; #endif diff --git a/ground/openpilotgcs/src/plugins/uploader/uploadergadgetfactory.cpp b/ground/openpilotgcs/src/plugins/uploader/uploadergadgetfactory.cpp index 4099b936b..53de182f6 100755 --- a/ground/openpilotgcs/src/plugins/uploader/uploadergadgetfactory.cpp +++ b/ground/openpilotgcs/src/plugins/uploader/uploadergadgetfactory.cpp @@ -52,8 +52,3 @@ IUAVGadgetConfiguration *UploaderGadgetFactory::createConfiguration(QSettings* q return new UploaderGadgetConfiguration(QString("Uploader"), qSettings); } -IOptionsPage *UploaderGadgetFactory::createOptionsPage(IUAVGadgetConfiguration *config) -{ - return new UploaderGadgetOptionsPage(qobject_cast(config)); -} - diff --git a/ground/openpilotgcs/src/plugins/uploader/uploadergadgetfactory.h b/ground/openpilotgcs/src/plugins/uploader/uploadergadgetfactory.h index fb44be6cc..c836287b1 100755 --- a/ground/openpilotgcs/src/plugins/uploader/uploadergadgetfactory.h +++ b/ground/openpilotgcs/src/plugins/uploader/uploadergadgetfactory.h @@ -46,7 +46,6 @@ public: Core::IUAVGadget *createGadget(QWidget *parent); IUAVGadgetConfiguration *createConfiguration(QSettings* qSettings); - IOptionsPage *createOptionsPage(IUAVGadgetConfiguration *config); }; #endif // UPLOADERGADGETFACTORY_H From 8b80b35964a647543ec9002ea226b484382450b8 Mon Sep 17 00:00:00 2001 From: PeterG Date: Sun, 29 May 2011 09:51:39 +0200 Subject: [PATCH 4/6] Remove " Gadget" from gadget names since it adds nothing useful. --- ground/openpilotgcs/src/plugins/config/configgadgetfactory.cpp | 2 +- ground/openpilotgcs/src/plugins/dial/dialgadgetfactory.cpp | 2 +- .../src/plugins/gpsdisplay/gpsdisplaygadgetfactory.cpp | 2 +- .../src/plugins/lineardial/lineardialgadgetfactory.cpp | 2 +- .../src/plugins/modelview/modelviewgadgetfactory.cpp | 2 +- ground/openpilotgcs/src/plugins/opmap/opmapgadgetfactory.cpp | 2 +- ground/openpilotgcs/src/plugins/pfd/pfdgadgetfactory.cpp | 2 +- .../src/plugins/pipxtreme/pipxtremegadgetfactory.cpp | 2 +- ground/openpilotgcs/src/plugins/scope/scopegadgetfactory.cpp | 2 +- .../src/plugins/systemhealth/systemhealthgadgetfactory.cpp | 2 +- .../openpilotgcs/src/plugins/uploader/uploadergadgetfactory.cpp | 2 +- 11 files changed, 11 insertions(+), 11 deletions(-) diff --git a/ground/openpilotgcs/src/plugins/config/configgadgetfactory.cpp b/ground/openpilotgcs/src/plugins/config/configgadgetfactory.cpp index 1c1cb9ae5..f19c3dac8 100644 --- a/ground/openpilotgcs/src/plugins/config/configgadgetfactory.cpp +++ b/ground/openpilotgcs/src/plugins/config/configgadgetfactory.cpp @@ -32,7 +32,7 @@ #include ConfigGadgetFactory::ConfigGadgetFactory(QObject *parent) : - IUAVGadgetFactory(QString("ConfigGadget"), tr("Config Gadget"), parent) + IUAVGadgetFactory(QString("ConfigGadget"), tr("Config"), parent) { } diff --git a/ground/openpilotgcs/src/plugins/dial/dialgadgetfactory.cpp b/ground/openpilotgcs/src/plugins/dial/dialgadgetfactory.cpp index c267b4ee3..88cb6a024 100644 --- a/ground/openpilotgcs/src/plugins/dial/dialgadgetfactory.cpp +++ b/ground/openpilotgcs/src/plugins/dial/dialgadgetfactory.cpp @@ -34,7 +34,7 @@ DialGadgetFactory::DialGadgetFactory(QObject *parent) : IUAVGadgetFactory(QString("DialGadget"), - tr("Analog Dial Gadget"), + tr("Analog Dial"), parent) { } diff --git a/ground/openpilotgcs/src/plugins/gpsdisplay/gpsdisplaygadgetfactory.cpp b/ground/openpilotgcs/src/plugins/gpsdisplay/gpsdisplaygadgetfactory.cpp index 673891a16..e87290cba 100644 --- a/ground/openpilotgcs/src/plugins/gpsdisplay/gpsdisplaygadgetfactory.cpp +++ b/ground/openpilotgcs/src/plugins/gpsdisplay/gpsdisplaygadgetfactory.cpp @@ -33,7 +33,7 @@ GpsDisplayGadgetFactory::GpsDisplayGadgetFactory(QObject *parent) : IUAVGadgetFactory(QString("GpsDisplayGadget"), - tr("GPS Display Gadget"), + tr("GPS Display"), parent) { } diff --git a/ground/openpilotgcs/src/plugins/lineardial/lineardialgadgetfactory.cpp b/ground/openpilotgcs/src/plugins/lineardial/lineardialgadgetfactory.cpp index 33f6e0421..9e79256d3 100644 --- a/ground/openpilotgcs/src/plugins/lineardial/lineardialgadgetfactory.cpp +++ b/ground/openpilotgcs/src/plugins/lineardial/lineardialgadgetfactory.cpp @@ -33,7 +33,7 @@ LineardialGadgetFactory::LineardialGadgetFactory(QObject *parent) : IUAVGadgetFactory(QString("LineardialGadget"), - tr("Bargraph Dial Gadget"), + tr("Bargraph Dial"), parent) { } diff --git a/ground/openpilotgcs/src/plugins/modelview/modelviewgadgetfactory.cpp b/ground/openpilotgcs/src/plugins/modelview/modelviewgadgetfactory.cpp index a87bbbe75..090c6cc70 100644 --- a/ground/openpilotgcs/src/plugins/modelview/modelviewgadgetfactory.cpp +++ b/ground/openpilotgcs/src/plugins/modelview/modelviewgadgetfactory.cpp @@ -33,7 +33,7 @@ #include ModelViewGadgetFactory::ModelViewGadgetFactory(QObject *parent) : - IUAVGadgetFactory(QString("ModelViewGadget"), tr("ModelView Gadget"), parent) + IUAVGadgetFactory(QString("ModelViewGadget"), tr("ModelView"), parent) { } diff --git a/ground/openpilotgcs/src/plugins/opmap/opmapgadgetfactory.cpp b/ground/openpilotgcs/src/plugins/opmap/opmapgadgetfactory.cpp index fa60d10f0..5a3908c89 100644 --- a/ground/openpilotgcs/src/plugins/opmap/opmapgadgetfactory.cpp +++ b/ground/openpilotgcs/src/plugins/opmap/opmapgadgetfactory.cpp @@ -32,7 +32,7 @@ #include OPMapGadgetFactory::OPMapGadgetFactory(QObject *parent) : - IUAVGadgetFactory(QString("OPMapGadget"), tr("OPMap Gadget"), parent) + IUAVGadgetFactory(QString("OPMapGadget"), tr("OPMap"), parent) { } diff --git a/ground/openpilotgcs/src/plugins/pfd/pfdgadgetfactory.cpp b/ground/openpilotgcs/src/plugins/pfd/pfdgadgetfactory.cpp index 82932cf62..b76b87361 100644 --- a/ground/openpilotgcs/src/plugins/pfd/pfdgadgetfactory.cpp +++ b/ground/openpilotgcs/src/plugins/pfd/pfdgadgetfactory.cpp @@ -33,7 +33,7 @@ PFDGadgetFactory::PFDGadgetFactory(QObject *parent) : IUAVGadgetFactory(QString("PFDGadget"), - tr("Primary Flight Display Gadget"), + tr("Primary Flight Display"), parent) { } diff --git a/ground/openpilotgcs/src/plugins/pipxtreme/pipxtremegadgetfactory.cpp b/ground/openpilotgcs/src/plugins/pipxtreme/pipxtremegadgetfactory.cpp index 01c16435c..4574913d5 100644 --- a/ground/openpilotgcs/src/plugins/pipxtreme/pipxtremegadgetfactory.cpp +++ b/ground/openpilotgcs/src/plugins/pipxtreme/pipxtremegadgetfactory.cpp @@ -31,7 +31,7 @@ #include PipXtremeGadgetFactory::PipXtremeGadgetFactory(QObject *parent) : - IUAVGadgetFactory(QString("PipXtreme"), tr("PipXtreme Gadget"), parent) + IUAVGadgetFactory(QString("PipXtreme"), tr("PipXtreme"), parent) { } diff --git a/ground/openpilotgcs/src/plugins/scope/scopegadgetfactory.cpp b/ground/openpilotgcs/src/plugins/scope/scopegadgetfactory.cpp index 1c62c1f57..adbdcdd0d 100644 --- a/ground/openpilotgcs/src/plugins/scope/scopegadgetfactory.cpp +++ b/ground/openpilotgcs/src/plugins/scope/scopegadgetfactory.cpp @@ -33,7 +33,7 @@ ScopeGadgetFactory::ScopeGadgetFactory(QObject *parent) : IUAVGadgetFactory(QString("ScopeGadget"), - tr("Scope Gadget"), + tr("Scope"), parent) { } diff --git a/ground/openpilotgcs/src/plugins/systemhealth/systemhealthgadgetfactory.cpp b/ground/openpilotgcs/src/plugins/systemhealth/systemhealthgadgetfactory.cpp index 80abb1be7..41e068c17 100644 --- a/ground/openpilotgcs/src/plugins/systemhealth/systemhealthgadgetfactory.cpp +++ b/ground/openpilotgcs/src/plugins/systemhealth/systemhealthgadgetfactory.cpp @@ -33,7 +33,7 @@ SystemHealthGadgetFactory::SystemHealthGadgetFactory(QObject *parent) : IUAVGadgetFactory(QString("SystemHealthGadget"), - tr("System Health Gadget"), + tr("System Health"), parent) { } diff --git a/ground/openpilotgcs/src/plugins/uploader/uploadergadgetfactory.cpp b/ground/openpilotgcs/src/plugins/uploader/uploadergadgetfactory.cpp index 53de182f6..692985e5c 100755 --- a/ground/openpilotgcs/src/plugins/uploader/uploadergadgetfactory.cpp +++ b/ground/openpilotgcs/src/plugins/uploader/uploadergadgetfactory.cpp @@ -33,7 +33,7 @@ #include UploaderGadgetFactory::UploaderGadgetFactory(QObject *parent) : - IUAVGadgetFactory(QString("Uploader"), tr("Uploader Gadget"), parent) + IUAVGadgetFactory(QString("Uploader"), tr("Uploader"), parent) { } From d18a229a76f6dd1ed295cfcf0052a70abf4b17f2 Mon Sep 17 00:00:00 2001 From: PeterG Date: Sun, 29 May 2011 14:01:20 +0200 Subject: [PATCH 5/6] Change default settings format from ini to xml --- ground/openpilotgcs/src/app/app.pro | 2 + ground/openpilotgcs/src/app/main.cpp | 5 +- .../openpilotgcs/src/libs/utils/pathutils.cpp | 3 +- ground/openpilotgcs/src/libs/utils/utils.pro | 5 +- .../importexport => libs/utils}/xmlconfig.cpp | 11 +- .../importexport => libs/utils}/xmlconfig.h | 9 +- .../src/plugins/coreplugin/OpenPilotGCS.xml | 2832 +++++++++++++++++ .../src/plugins/coreplugin/core.qrc | 2 +- .../src/plugins/coreplugin/mainwindow.cpp | 41 +- .../src/plugins/importexport/importexport.pro | 6 +- .../importexport/importexportgadgetwidget.cpp | 2 +- 11 files changed, 2885 insertions(+), 33 deletions(-) rename ground/openpilotgcs/src/{plugins/importexport => libs/utils}/xmlconfig.cpp (94%) rename ground/openpilotgcs/src/{plugins/importexport => libs/utils}/xmlconfig.h (90%) create mode 100644 ground/openpilotgcs/src/plugins/coreplugin/OpenPilotGCS.xml diff --git a/ground/openpilotgcs/src/app/app.pro b/ground/openpilotgcs/src/app/app.pro index 4170c0c13..4b1534ad9 100644 --- a/ground/openpilotgcs/src/app/app.pro +++ b/ground/openpilotgcs/src/app/app.pro @@ -4,10 +4,12 @@ include(../shared/qtsingleapplication/qtsingleapplication.pri) TEMPLATE = app TARGET = $$GCS_APP_TARGET DESTDIR = $$GCS_APP_PATH +QT += xml SOURCES += main.cpp include(../rpath.pri) +include(../libs/utils/utils.pri) win32 { CONFIG(debug, debug|release):LIBS *= -lExtensionSystemd -lAggregationd -lQExtSerialPortd diff --git a/ground/openpilotgcs/src/app/main.cpp b/ground/openpilotgcs/src/app/main.cpp index 55f7d5312..29111836c 100644 --- a/ground/openpilotgcs/src/app/main.cpp +++ b/ground/openpilotgcs/src/app/main.cpp @@ -27,6 +27,7 @@ */ #include "qtsingleapplication.h" +#include "utils/xmlconfig.h" #include #include @@ -243,10 +244,10 @@ int main(int argc, char **argv) QString locale = QLocale::system().name(); // Must be done before any QSettings class is created - QSettings::setPath(QSettings::IniFormat, QSettings::SystemScope, + QSettings::setPath(XmlConfig::XmlSettingsFormat, QSettings::SystemScope, QCoreApplication::applicationDirPath()+QLatin1String(SHARE_PATH)); // keep this in sync with the MainWindow ctor in coreplugin/mainwindow.cpp - QSettings settings(QSettings::IniFormat, QSettings::UserScope, + QSettings settings(XmlConfig::XmlSettingsFormat, QSettings::UserScope, QLatin1String("OpenPilot"), QLatin1String("OpenPilotGCS")); overrideSettings(settings, argc, argv); diff --git a/ground/openpilotgcs/src/libs/utils/pathutils.cpp b/ground/openpilotgcs/src/libs/utils/pathutils.cpp index 9b42dfdf5..0ecdd3c85 100644 --- a/ground/openpilotgcs/src/libs/utils/pathutils.cpp +++ b/ground/openpilotgcs/src/libs/utils/pathutils.cpp @@ -26,6 +26,7 @@ */ #include "pathutils.h" +#include "xmlconfig.h" #include #include @@ -97,7 +98,7 @@ QString PathUtils::GetStoragePath() { // This routine works with "/" as the standard: // Work out where the settings are stored on the machine - QSettings set(QSettings::IniFormat, QSettings::UserScope,QLatin1String("OpenPilot"), QLatin1String("OpenPilotGCS")); + QSettings set(XmlConfig::XmlSettingsFormat, QSettings::UserScope,QLatin1String("OpenPilot"), QLatin1String("OpenPilotGCS")); QFileInfo f(set.fileName()); QDir dir(f.absoluteDir()); diff --git a/ground/openpilotgcs/src/libs/utils/utils.pro b/ground/openpilotgcs/src/libs/utils/utils.pro index 570b274f7..7b923a567 100644 --- a/ground/openpilotgcs/src/libs/utils/utils.pro +++ b/ground/openpilotgcs/src/libs/utils/utils.pro @@ -2,7 +2,8 @@ TEMPLATE = lib TARGET = Utils QT += gui \ - network + network \ + xml DEFINES += QTCREATOR_UTILS_LIB @@ -45,6 +46,7 @@ SOURCES += reloadpromptutils.cpp \ pathutils.cpp \ worldmagmodel.cpp \ homelocationutil.cpp +SOURCES += xmlconfig.cpp win32 { SOURCES += abstractprocess_win.cpp \ @@ -95,6 +97,7 @@ HEADERS += utils_global.h \ pathutils.h \ worldmagmodel.h \ homelocationutil.h +HEADERS += xmlconfig.h FORMS += filewizardpage.ui \ projectintropage.ui \ diff --git a/ground/openpilotgcs/src/plugins/importexport/xmlconfig.cpp b/ground/openpilotgcs/src/libs/utils/xmlconfig.cpp similarity index 94% rename from ground/openpilotgcs/src/plugins/importexport/xmlconfig.cpp rename to ground/openpilotgcs/src/libs/utils/xmlconfig.cpp index 79774d696..e924e20bd 100644 --- a/ground/openpilotgcs/src/plugins/importexport/xmlconfig.cpp +++ b/ground/openpilotgcs/src/libs/utils/xmlconfig.cpp @@ -38,6 +38,7 @@ #include #include #include +#include #define NUM_PREFIX "arr_" @@ -84,6 +85,10 @@ void XmlConfig::handleNode(QDomElement* node, QSettings::SettingsMap &map, QStri if ( nodeName.startsWith(NUM_PREFIX) ){ nodeName.replace(NUM_PREFIX, ""); } + // Xml tags are restrictive with allowed characters, + // so we urlencode and replace % with __PCT__ on file + nodeName = nodeName.replace("__PCT__", "%"); + nodeName = QUrl::fromPercentEncoding(nodeName.toAscii()); if ( nodeName == XmlConfig::rootName ) ; @@ -99,7 +104,7 @@ void XmlConfig::handleNode(QDomElement* node, QSettings::SettingsMap &map, QStri handleNode( static_cast(&child), map, path); } else if ( child.isText() ){ - qDebug() << "Key: " << path << " Value:" << node->text(); +// qDebug() << "Key: " << path << " Value:" << node->text(); map.insert(path, stringToVariant(node->text())); } else{ @@ -123,6 +128,10 @@ bool XmlConfig::writeXmlFile(QIODevice &device, const QSettings::SettingsMap &ma if ( elem == "" ){ continue; } + // Xml tags are restrictive with allowed characters, + // so we urlencode and replace % with __PCT__ on file + elem = QString(QUrl::toPercentEncoding(elem)); + elem = elem.replace("%", "__PCT__"); // For arrays, QT will use simple numbers as keys, which is not a valid element in XML. // Therefore we prefixed these. if ( elem.startsWith(NUM_PREFIX) ){ diff --git a/ground/openpilotgcs/src/plugins/importexport/xmlconfig.h b/ground/openpilotgcs/src/libs/utils/xmlconfig.h similarity index 90% rename from ground/openpilotgcs/src/plugins/importexport/xmlconfig.h rename to ground/openpilotgcs/src/libs/utils/xmlconfig.h index 91cba38d1..447b2b6d4 100644 --- a/ground/openpilotgcs/src/plugins/importexport/xmlconfig.h +++ b/ground/openpilotgcs/src/libs/utils/xmlconfig.h @@ -26,13 +26,18 @@ #ifndef XMLCONFIG_H #define XMLCONFIG_H -#include "importexport_global.h" +#if defined(QTCREATOR_UTILS_LIB) +# define XMLCONFIG_EXPORT Q_DECL_EXPORT +#else +# define XMLCONFIG_EXPORT Q_DECL_IMPORT +#endif +#include #include #include #include -class IMPORTEXPORT_EXPORT XmlConfig : QObject +class XMLCONFIG_EXPORT XmlConfig : QObject { public: diff --git a/ground/openpilotgcs/src/plugins/coreplugin/OpenPilotGCS.xml b/ground/openpilotgcs/src/plugins/coreplugin/OpenPilotGCS.xml new file mode 100644 index 000000000..d46f83424 --- /dev/null +++ b/ground/openpilotgcs/src/plugins/coreplugin/OpenPilotGCS.xml @@ -0,0 +1,2832 @@ + + + en_AU + true + + + 0 + + + #666666 + false + true + + + + + false + 1.0.0 + + + + + + + 0 + + + + + + + + + 0 + + 1 + + false + + 0 + + + + + + + + + false + 0.0.0 + + + + + + + false + 0.0.0 + + + false + background + %%DATAPATH%%dials/default/attitude.svg + foreground + needle + needle + needle3 + Ubuntu,11,-1,5,50,0,0,0,0,0 + AttitudeActual + -1 + 360 + 0 + Rotate + Roll + AttitudeActual + 75 + 20 + 0 + Vertical + Pitch + AttitudeActual + -1 + 360 + 0 + Rotate + Roll + false + + + + + false + 0.0.0 + + + false + background + %%DATAPATH%%dials/default/altimeter.svg + foreground + needle + needle2 + needle3 + Ubuntu,11,-1,5,50,0,0,0,0,0 + BaroAltitude + 1 + 10 + 0 + Rotate + Altitude + BaroAltitude + 1 + 100 + 0 + Rotate + Altitude + BaroAltitude + 1 + 1000 + 0 + Rotate + Altitude + false + + + + + false + 0.0.0 + + + false + background + %%DATAPATH%%dials/default/barometer.svg + + needle + + + Ubuntu,11,-1,5,50,0,0,0,0,0 + BaroAltitude + 10 + 1120 + 1000 + Rotate + Pressure + BaroAltitude + 1 + 100 + 0 + Rotate + Altitude + BaroAltitude + 1 + 1000 + 0 + Rotate + Altitude + false + + + + + false + 0.0.0 + + + false + background + %%DATAPATH%%dials/default/vsi.svg + + needle + + + Ubuntu,11,-1,5,50,0,0,0,0,0 + VelocityActual + 0.01 + 12 + -12 + Rotate + Down + BaroAltitude + 1 + 100 + 0 + Rotate + Altitude + BaroAltitude + 1 + 1000 + 0 + Rotate + Altitude + false + + + + + false + 0.0.0 + + + false + background + %%DATAPATH%%dials/default/compass.svg + foreground + needle + + + Ubuntu,11,-1,5,50,0,0,0,0,0 + AttitudeActual + -1 + 360 + 0 + Rotate + Yaw + BaroAltitude + 1 + 100 + 0 + Rotate + Altitude + BaroAltitude + 1 + 1000 + 0 + Rotate + Altitude + false + + + + + false + 0.0.0 + + + false + background + %%DATAPATH%%dials/deluxe/attitude.svg + foreground + needle + needle + needle3 + Ubuntu,11,-1,5,50,0,0,0,0,0 + AttitudeActual + -1 + 360 + 0 + Rotate + Roll + AttitudeActual + 75 + 20 + 0 + Vertical + Pitch + AttitudeActual + -1 + 360 + 0 + Rotate + Roll + false + + + + + false + 0.0.0 + + + false + background + %%DATAPATH%%dials/deluxe/altimeter.svg + foreground + needle + needle2 + needle3 + Ubuntu,11,-1,5,50,0,0,0,0,0 + BaroAltitude + 1 + 10 + 0 + Rotate + Altitude + BaroAltitude + 1 + 100 + 0 + Rotate + Altitude + BaroAltitude + 1 + 1000 + 0 + Rotate + Altitude + false + + + + + false + 0.0.0 + + + false + background + %%DATAPATH%%dials/deluxe/barometer.svg + foreground + needle + + + Ubuntu,11,-1,5,50,0,0,0,0,0 + BaroAltitude + 10 + 1120 + 1000 + Rotate + Pressure + BaroAltitude + 1 + 100 + 0 + Rotate + Altitude + BaroAltitude + 1 + 1000 + 0 + Rotate + Altitude + false + + + + + false + 0.0.0 + + + false + background + %%DATAPATH%%dials/deluxe/vsi.svg + foreground + needle + + + Ubuntu,11,-1,5,50,0,0,0,0,0 + VelocityActual + 0.01 + 11.2 + -11.2 + Rotate + Down + BaroAltitude + 1 + 100 + 0 + Rotate + Altitude + BaroAltitude + 1 + 1000 + 0 + Rotate + Altitude + false + + + + + false + 0.0.0 + + + false + background + %%DATAPATH%%dials/deluxe/compass.svg + foreground + needle + + + Ubuntu,11,-1,5,50,0,0,0,0,0 + AttitudeActual + -1 + 360 + 0 + Rotate + Yaw + BaroAltitude + 1 + 100 + 0 + Rotate + Altitude + BaroAltitude + 1 + 1000 + 0 + Rotate + Altitude + false + + + + + false + 0.0.0 + + + false + background + %%DATAPATH%%dials/deluxe/speed.svg + foreground + needle + + + Ubuntu,11,-1,5,50,0,0,0,0,0 + GPSPosition + 3.6 + 120 + 0 + Rotate + Groundspeed + BaroAltitude + 1 + 100 + 0 + Rotate + Altitude + BaroAltitude + 1 + 1000 + 0 + Rotate + Altitude + false + + + + + false + 0.0.0 + + + false + background + %%DATAPATH%%dials/deluxe/thermometer.svg + foreground + needle + needle2 + needle3 + Ubuntu,11,-1,5,50,0,0,0,0,0 + BaroAltitude + 1 + 120 + 0 + Rotate + Temperature + BaroAltitude + 1 + 100 + 0 + Rotate + Altitude + BaroAltitude + 1 + 1000 + 0 + Rotate + Altitude + false + + + + + false + 0.0.0 + + + false + background + /home/lafargue/OP/OpenPilot/trunk/artwork/Dials/deluxe/turncoordinator.svg + foreground + needle + needle2 + needle2 + Ubuntu,11,-1,5,50,0,0,0,0,0 + AttitudeActual + -1 + 360 + 0 + Rotate + Roll + AttitudeRaw + 1 + 20 + -20 + Horizontal + accels-X + AttitudeRaw + -1 + 360 + 0 + Rotate + accels-X + false + + + + + false + 0.0.0 + + + false + background + %%DATAPATH%%dials/default/speed.svg + + needle + + + Ubuntu,11,-1,5,50,0,0,0,0,0 + GPSPosition + 3.6 + 120 + 0 + Rotate + Groundspeed + BaroAltitude + 1 + 100 + 0 + Rotate + Altitude + BaroAltitude + 1 + 1000 + 0 + Rotate + Altitude + false + + + + + false + 0.0.0 + + + false + background + %%DATAPATH%%dials/hi-contrast/attitude.svg + foreground + needle + needle + needle3 + Ubuntu,11,-1,5,50,0,0,0,0,0 + AttitudeActual + -1 + 360 + 0 + Rotate + Roll + AttitudeActual + 75 + 20 + 0 + Vertical + Pitch + AttitudeActual + -1 + 360 + 0 + Rotate + Roll + false + + + + + false + 0.0.0 + + + false + background + %%DATAPATH%%dials/hi-contrast/altimeter.svg + foreground + needle + needle2 + needle3 + Ubuntu,11,-1,5,50,0,0,0,0,0 + BaroAltitude + 1 + 10 + 0 + Rotate + Altitude + BaroAltitude + 1 + 100 + 0 + Rotate + Altitude + BaroAltitude + 1 + 1000 + 0 + Rotate + Altitude + false + + + + + false + 0.0.0 + + + false + background + %%DATAPATH%%dials/hi-contrast/barometer.svg + + needle + + + Ubuntu,11,-1,5,50,0,0,0,0,0 + BaroAltitude + 10 + 1120 + 1000 + Rotate + Pressure + BaroAltitude + 1 + 100 + 0 + Rotate + Altitude + BaroAltitude + 1 + 1000 + 0 + Rotate + Altitude + false + + + + + false + 0.0.0 + + + false + background + %%DATAPATH%%dials/hi-contrast/vsi.svg + + needle + + + Ubuntu,11,-1,5,50,0,0,0,0,0 + VelocityActual + 0.01 + 12 + -12 + Rotate + Down + BaroAltitude + 1 + 100 + 0 + Rotate + Altitude + BaroAltitude + 1 + 1000 + 0 + Rotate + Altitude + false + + + + + false + 0.0.0 + + + false + background + %%DATAPATH%%dials/hi-contrast/compass.svg + foreground + needle + + + Ubuntu,11,-1,5,50,0,0,0,0,0 + AttitudeActual + -1 + 360 + 0 + Rotate + Yaw + BaroAltitude + 1 + 100 + 0 + Rotate + Altitude + BaroAltitude + 1 + 1000 + 0 + Rotate + Altitude + false + + + + + false + 0.0.0 + + + false + background + %%DATAPATH%%dials/hi-contrast/speed.svg + + needle + + + Ubuntu,11,-1,5,50,0,0,0,0,0 + GPSPosition + 3.6 + 120 + 0 + Rotate + Groundspeed + BaroAltitude + 1 + 100 + 0 + Rotate + Altitude + BaroAltitude + 1 + 1000 + 0 + Rotate + Altitude + false + + + + + false + 0.0.0 + + + false + background + %%DATAPATH%%dials/hi-contrast/thermometer.svg + + needle + needle2 + needle3 + Ubuntu,11,-1,5,50,0,0,0,0,0 + BaroAltitude + 1 + 120 + 0 + Rotate + Temperature + BaroAltitude + 1 + 100 + 0 + Rotate + Altitude + BaroAltitude + 1 + 1000 + 0 + Rotate + Altitude + false + + + + + false + 0.0.0 + + + false + background + %%DATAPATH%%dials/default/thermometer.svg + + needle + needle2 + needle3 + Ubuntu,11,-1,5,50,0,0,0,0,0 + ManualControlCommand + 1 + 2000 + 1000 + Rotate + Channel-3 + BaroAltitude + 1 + 100 + 0 + Rotate + Altitude + BaroAltitude + 1 + 1000 + 0 + Rotate + Altitude + false + + + + + false + 0.0.0 + + + false + background + %%DATAPATH%%dials/default/thermometer.svg + + needle + needle2 + needle3 + Ubuntu,11,-1,5,50,0,0,0,0,0 + BaroAltitude + 1 + 120 + 0 + Rotate + Temperature + BaroAltitude + 1 + 100 + 0 + Rotate + Altitude + BaroAltitude + 1 + 1000 + 0 + Rotate + Altitude + false + + + + + + + false + 0.0.0 + + + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0.1 + 3 + 0 + 0.1 + 3 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + false + false + true + false + false + false + false + false + 2 + 1 + 0 + 2 + 3 + + + + + + + false + 0.0.0 + + + Telemetry + 3 + 0 + 0 + Serial port 0 + 11 + 0 + + + + + false + 0.0.0 + + + Serial + 3 + 0 + 0 + Serial port 0 + 17 + 0 + + + + + + + false + 0.0.0 + + + \usr\games\fgfs + \usr\share\games\FlightGear + 127.0.0.1 + 9009 + + + false + 9010 + 127.0.0.1 + FG + true + + + + + false + 0.0.0 + + + \home\lafargue\X-Plane 9\X-Plane-i686 + \usr\share\games\FlightGear + 127.0.0.3 + 6756 + + + false + 49000 + 127.0.0.1 + X-Plane + false + + + + + + + false + 1.0.1 + + + gcs.ini + + + + + + + false + 0.0.0 + + + %%DATAPATH%%dials/default/lineardial-vertical.svg + 0 + 1 + Andale Mono,12,-1,5,75,0,0,0,0,0 + 50 + 0 + 100 + 0 + 100 + 80 + AhrsStatus + CPULoad + false + 80 + 50 + + + + + false + 0.0.0 + + + %%DATAPATH%%dials/default/lineardial-horizontal.svg + 2 + 1 + Andale Mono,8,-1,5,50,0,0,0,0,0 + -9 + -10 + 11 + -11 + 11 + -11 + AttitudeRaw + accels-X + false + -5 + -11 + + + + + false + 0.0.0 + + + %%DATAPATH%%dials/default/lineardial-horizontal.svg + 2 + 1 + Andale Mono,6,-1,5,50,0,0,0,0,0 + -9 + -10 + 11 + -11 + 11 + -11 + AttitudeRaw + accels-Y + false + -5 + -11 + + + + + false + 0.0.0 + + + %%DATAPATH%%dials/default/lineardial-horizontal.svg + 2 + 1 + Andale Mono,8,-1,5,50,0,0,0,0,0 + -9 + -10 + 11 + -11 + 11 + -11 + AttitudeRaw + accels-Z + false + -5 + -11 + + + + + false + 0.0.0 + + + %%DATAPATH%%dials/default/arm-status.svg + 0 + 1 + ,12,-1,5,50,0,0,0,0,0 + 100 + 66 + 100 + 0 + 33 + 0 + FlightStatus + Armed + false + 66 + 33 + + + + + false + 0.0.0 + + + %%DATAPATH%%dials/default/textonly.svg + 0 + 0.001 + ,12,-1,5,50,0,0,0,0,0 + 100 + 66 + 100 + 0 + 33 + 0 + SystemStats + FlightTime + false + 66 + 33 + + + + + false + 0.0.0 + + + %%DATAPATH%%dials/default/flightmode-status.svg + 0 + 1 + ,12,-1,5,50,0,0,0,0,0 + 100 + 66 + 100 + 0 + 33 + 0 + FlightStatus + FlightMode + false + 66 + 33 + + + + + false + 0.0.0 + + + %%DATAPATH%%dials/default/gps-signal.svg + 0 + 1 + ,12,-1,5,50,0,0,0,0,0 + 0 + 0 + 12 + 0 + 0 + 0 + GPSPosition + Satellites + false + 0 + 0 + + + + + false + 0.0.0 + + + %%DATAPATH%%dials/default/gps-status.svg + 0 + 1 + ,12,-1,5,50,0,0,0,0,0 + 100 + 66 + 100 + 0 + 33 + 0 + GPSPosition + Status + false + 66 + 33 + + + + + false + 0.0.0 + + + %%DATAPATH%%dials/default/lineardial-vertical.svg + 0 + 1 + Andale Mono,12,-1,5,75,0,0,0,0,0 + 50 + 0 + 100 + 0 + 100 + 80 + SystemStats + CPULoad + false + 80 + 50 + + + + + false + 0.0.0 + + + %%DATAPATH%%dials/default/lineardial-vertical.svg + 2 + 1 + Andale Mono,12,-1,5,75,0,0,0,0,0 + 0.5 + -0.5 + 1 + -1 + 1 + -1 + ActuatorDesired + Pitch + false + 0.8 + -0.8 + + + + + false + 0.0.0 + + + %%DATAPATH%%dials/default/lineardial-vertical.svg + 2 + 1 + Andale Mono,12,-1,5,75,0,0,0,0,0 + 0.5 + -0.5 + 1 + -1 + 1 + -1 + ManualControlCommand + Pitch + false + 0.8 + -0.8 + + + + + false + 0.0.0 + + + %%DATAPATH%%dials/default/lineardial-vertical.svg + 2 + 1 + Andale Mono,12,-1,5,75,0,0,0,0,0 + 0.8 + 0.3 + 90 + -90 + 1 + 0 + AttitudeActual + Pitch + false + 0.9 + 0.1 + + + + + false + 0.0.0 + + + %%DATAPATH%%dials/default/lineardial-vertical.svg + 2 + 1 + Andale Mono,12,-1,5,75,0,0,0,0,0 + 0.5 + -0.5 + 1 + -1 + 1 + -1 + ActuatorDesired + Roll + false + 0.8 + -0.8 + + + + + false + 0.0.0 + + + %%DATAPATH%%dials/default/lineardial-vertical.svg + 2 + 1 + Andale Mono,12,-1,5,75,0,0,0,0,0 + 0.5 + -0.5 + 1 + -1 + 1 + -1 + ManualControlCommand + Roll + false + 0.8 + -0.8 + + + + + false + 0.0.0 + + + %%DATAPATH%%dials/default/lineardial-horizontal.svg + 0 + 1 + Andale Mono,12,-1,5,75,0,0,0,0,0 + 650 + 0 + 1200 + 0 + 1200 + 900 + GCSTelemetryStats + RxDataRate + false + 900 + 650 + + + + + false + 0.0.0 + + + %%DATAPATH%%dials/default/lineardial-horizontal.svg + 0 + 1 + Andale Mono,12,-1,5,75,0,0,0,0,0 + 650 + 0 + 1200 + 0 + 1200 + 900 + GCSTelemetryStats + TxDataRate + false + 900 + 650 + + + + + false + 0.0.0 + + + %%DATAPATH%%dials/default/lineardial-vertical.svg + 2 + 1 + Andale Mono,12,-1,5,75,0,0,0,0,0 + 0.5 + 0 + 1 + 0 + 1 + 0.75 + ManualControlCommand + Throttle + false + 0.75 + 0.5 + + + + + false + 0.0.0 + + + %%DATAPATH%%dials/default/lineardial-vertical.svg + 2 + 1 + Andale Mono,12,-1,5,75,0,0,0,0,0 + 0.5 + -0.5 + 1 + -1 + 1 + -1 + ActuatorDesired + Yaw + false + 0.8 + -0.8 + + + + + false + 0.0.0 + + + %%DATAPATH%%dials/default/lineardial-vertical.svg + 2 + 1 + Andale Mono,12,-1,5,75,0,0,0,0,0 + 0.5 + -0.5 + 1 + -1 + 1 + -1 + ManualControlCommand + Yaw + false + 0.8 + -0.8 + + + + + + + false + 0.0.0 + + + %%DATAPATH%%models/multi/aeroquad/aeroquad_+.3ds + %%DATAPATH%%models/backgrounds/default_background.png + false + + + + + false + 0.0.0 + + + %%DATAPATH%%models/multi/easy_quad/easy_quad_X.3ds + %%DATAPATH%%models/backgrounds/default_background.png + false + + + + + false + 0.0.0 + + + %%DATAPATH%%models/planes/Easystar/easystar.3ds + %%DATAPATH%%models/backgrounds/default_background.png + false + + + + + false + 0.0.0 + + + %%DATAPATH%%models/planes/firecracker/firecracker.3ds + %%DATAPATH%%models/backgrounds/default_background.png + false + + + + + false + 0.0.0 + + + %%DATAPATH%%models/planes/funjet/funjet.3ds + %%DATAPATH%%models/backgrounds/default_background.png + false + + + + + false + 0.0.0 + + + %%DATAPATH%%models/multi/gaui_330x/gaui_330x.3ds + %%DATAPATH%%models/backgrounds/default_background.png + false + + + + + false + 0.0.0 + + + %%DATAPATH%%models/helis/t-rex/t-rex_450_xl.3ds + %%DATAPATH%%models/backgrounds/default_background.png + false + + + + + false + 0.0.0 + + + %%DATAPATH%%models/multi/mikrokopter/MK_Hexa.3ds + %%DATAPATH%%models/backgrounds/default_background.png + false + + + + + false + 0.0.0 + + + %%DATAPATH%%models/multi/mikrokopter/MK_L4-ME.3ds + %%DATAPATH%%models/backgrounds/default_background.png + false + + + + + false + 0.0.0 + + + %%DATAPATH%%models/multi/scorpion_tricopter/scorpion_tricopter.3ds + %%DATAPATH%%models/backgrounds/default_background.png + false + + + + + false + 0.0.0 + + + %%DATAPATH%%models/multi/test_quad/test_quad_+.3ds + %%DATAPATH%%models/backgrounds/default_background.png + false + + + + + false + 0.0.0 + + + %%DATAPATH%%models/multi/test_quad/test_quad_X.3ds + %%DATAPATH%%models/backgrounds/default_background.png + false + + + + + + + false + 0.0.0 + + + ServerAndCache + %%STOREPATH%%mapscache/ + 0 + 0 + 2 + GoogleSatellite + 2000 + false + mapquad.png + true + false + + + + + false + 0.0.0 + + + CacheOnly + %%STOREPATH%%mapscache/ + 0 + 0 + 2 + GoogleMap + 2000 + false + airplanepip.png + true + false + + + + + false + 0.0.0 + + + ServerAndCache + %%STOREPATH%%mapscache/ + 0 + 0 + 2 + GoogleMap + 2000 + false + mapquad.png + true + false + + + + + + + false + 0.0.0 + + + false + %%DATAPATH%%pfd/default/pfd.svg + false + false + + + + + false + 0.0.0 + + + true + %%DATAPATH%%pfd/default/pfd.svg + false + false + + + + + + + false + 0.0.0 + + + + + + + false + 0.0.0 + + + false + false + + 1000 + 60 + + 4294901760 + accels-X + AttitudeRaw + 0 + 0 + 0 + + + 4283782655 + accels-Y + AttitudeRaw + 0 + 0 + 0 + + + 4283804160 + accels-Z + AttitudeRaw + 0 + 0 + 0 + + 3 + 1 + 100 + + + + + false + 0.0.0 + + + false + false + + 1000 + 20 + + 4294901760 + Channel-4 + ActuatorCommand + 0 + 0 + 0 + + + 4294901760 + Channel-5 + ActuatorCommand + 0 + 0 + 0 + + + 4289374847 + Channel-6 + ActuatorCommand + 0 + 0 + 0 + + + 4289374847 + Channel-7 + ActuatorCommand + 0 + 0 + 0 + + 4 + 1 + 100 + + + + + false + 0.0.0 + + + false + false + + 1000 + 60 + + 4283760895 + Roll + AttitudeActual + 0 + 0 + 0 + + + 4278233600 + Yaw + AttitudeActual + 0 + 0 + 0 + + + 4294901760 + Pitch + AttitudeActual + 0 + 0 + 0 + + 3 + 1 + 100 + + + + + false + 0.0.0 + + + false + false + + 1000 + 60 + + 4278190080 + Pressure + BaroAltitude + 0 + 0 + 0 + + 1 + 1 + 1000 + + + + + false + 0.0.0 + + + false + false + + 1000 + 40 + + 4278190207 + Channel-1 + ManualControlCommand + 0 + 0 + 0 + + + 4294901760 + Channel-4 + ManualControlCommand + 0 + 0 + 0 + + + 4294901760 + Channel-5 + ManualControlCommand + 0 + 0 + 0 + + + 4294901760 + Channel-6 + ManualControlCommand + 0 + 0 + 0 + + + 4294901760 + Channel-7 + ManualControlCommand + 0 + 0 + 0 + + + 4283825920 + Channel-2 + ManualControlCommand + 0 + 0 + 0 + + + 4294923520 + Channel-3 + ManualControlCommand + 0 + 0 + 0 + + + 4294967040 + Channel-0 + ManualControlCommand + 0 + 0 + 0 + + 8 + 1 + 200 + + + + + false + 0.0.0 + + + false + false + + 1000 + 60 + + 4294901760 + accels-X + AttitudeRaw + 0 + 0 + 0 + + + 4283782655 + accels-Y + AttitudeRaw + 0 + 0 + 0 + + + 4283804160 + accels-Z + AttitudeRaw + 0 + 0 + 0 + + 3 + 1 + 500 + + + + + false + 0.0.0 + + + false + false + + 1000 + 60 + + 4283804160 + gyros-Z + AttitudeRaw + 0 + 0 + 0 + + + 4283782655 + gyros-Y + AttitudeRaw + 0 + 0 + 0 + + + 4294901760 + gyros-X + AttitudeRaw + 0 + 0 + 0 + + 3 + 1 + 500 + + + + + false + 0.0.0 + + + false + false + + 1000 + 60 + + 4294901760 + magnetometers-X + AttitudeRaw + 0 + 0 + 0 + + + 4283782655 + magnetometers-Y + AttitudeRaw + 0 + 0 + 0 + + + 4283804160 + magnetometers-Z + AttitudeRaw + 0 + 0 + 0 + + 3 + 1 + 500 + + + + + false + 0.0.0 + + + false + false + + 1000 + 240 + + 4294945280 + StackRemaining-System + TaskInfo + 0 + 0 + 0 + + + 4294945280 + StackRemaining-Actuator + TaskInfo + 0 + 0 + 0 + + + 4294945280 + StackRemaining-Guidance + TaskInfo + 0 + 0 + 0 + + + 4294945280 + StackRemaining-Watchdog + TaskInfo + 0 + 0 + 0 + + + 4294945280 + StackRemaining-TelemetryTx + TaskInfo + 0 + 0 + 0 + + + 4294945280 + StackRemaining-TelemetryTxPri + TaskInfo + 0 + 0 + 0 + + + 4294945280 + StackRemaining-TelemetryRx + TaskInfo + 0 + 0 + 0 + + + 4294945280 + StackRemaining-GPS + TaskInfo + 0 + 0 + 0 + + + 4294945280 + StackRemaining-ManualControl + TaskInfo + 0 + 0 + 0 + + + 4294945280 + StackRemaining-Altitude + TaskInfo + 0 + 0 + 0 + + + 4294945280 + StackRemaining-AHRSComms + TaskInfo + 0 + 0 + 0 + + + 4294945280 + StackRemaining-Stabilization + TaskInfo + 0 + 0 + 0 + + 12 + 1 + 1000 + + + + + false + 0.0.0 + + + false + false + + 1000 + 20 + + 4289374847 + TxFailures + GCSTelemetryStats + 0 + 0 + 0 + + + 4283782655 + RxFailures + GCSTelemetryStats + 0 + 0 + 0 + + + 4294901760 + TxRetries + GCSTelemetryStats + 0 + 0 + 0 + + 3 + 1 + 100 + + + + + false + 0.0.0 + + + false + false + + 1000 + 240 + + 4289374847 + RunningTime + AhrsStatus + 0 + 0 + 0 + + + 4294945407 + FlightTime + SystemStats + 0 + 0 + 0 + + 2 + 1 + 800 + + + + + + + false + 0.0.0 + + + %%DATAPATH%%diagrams/default/system-health.svg + + + + + + + false + 0.0.0 + + + #5baa56 + #ff7957 + 500 + + + + + + + false + 0.0.0 + + + 3 + 0 + 0 + /dev/ttyS0 + 14 + 0 + + + + + false + 1.2.0 + + + + + false + + + + + + + LineardialGadget + + Flight Time + + uavGadget + + + LineardialGadget + + GPS Sats + + uavGadget + + 2 + @Variant(AAAACQAAAAA=) + splitter + + + + LineardialGadget + + Flight mode + + uavGadget + + + LineardialGadget + + Arm Status + + uavGadget + + 2 + @Variant(AAAACQAAAAA=) + splitter + + 2 + @Variant(AAAACQAAAAIAAAACAAAA1wAAAAIAAADt) + splitter + + + PFDGadget + + raw + + uavGadget + + 1 + @Variant(AAAACQAAAAIAAAACAAAAkAAAAAIAAAJg) + splitter + + + + ModelViewGadget + + Test Quad X + + uavGadget + + + + + SystemHealthGadget + + default + + uavGadget + + + + LineardialGadget + + Mainboard CPU + + uavGadget + + + LineardialGadget + + AHRS CPU + + uavGadget + + 1 + @Variant(AAAACQAAAAIAAAACAAAAQAAAAAIAAABA) + splitter + + 1 + @Variant(AAAACQAAAAIAAAACAAABIwAAAAIAAACN) + splitter + + + + LineardialGadget + + Telemetry RX Rate Horizontal + + uavGadget + + + LineardialGadget + + Telemetry TX Rate Horizontal + + uavGadget + + 1 + @Variant(AAAACQAAAAA=) + splitter + + 2 + @Variant(AAAACQAAAAIAAAACAAABJQAAAAIAAABA) + splitter + + 1 + @Variant(AAAACQAAAAIAAAACAAABMAAAAAIAAAGx) + splitter + + 2 + @Variant(AAAACQAAAAIAAAACAAABxQAAAAIAAAFH) + splitter + + + + OPMapGadget + + Google Sat + + uavGadget + + + + + + + DialGadget + + Deluxe Groundspeed kph + + uavGadget + + + DialGadget + + Deluxe Barometer + + uavGadget + + 2 + @Variant(AAAACQAAAAA=) + splitter + + + + DialGadget + + Deluxe Attitude + + uavGadget + + + DialGadget + + Deluxe Compass + + uavGadget + + 2 + @Variant(AAAACQAAAAA=) + splitter + + 1 + @Variant(AAAACQAAAAIAAAACAAAAgwAAAAIAAACK) + splitter + + + + DialGadget + + Deluxe Baro Altimeter + + uavGadget + + + DialGadget + + Deluxe Climbrate + + uavGadget + + 2 + @Variant(AAAACQAAAAA=) + splitter + + 1 + @Variant(AAAACQAAAAIAAAACAAABFQAAAAIAAACH) + splitter + + + + LineardialGadget + + Throttle + + uavGadget + + + + LineardialGadget + + Roll Desired + + uavGadget + + + + LineardialGadget + + Pitch Desired + + uavGadget + + + LineardialGadget + + Yaw Desired + + uavGadget + + 1 + @Variant(AAAACQAAAAIAAAACAAAAQAAAAAIAAAE3) + splitter + + 1 + @Variant(AAAACQAAAAIAAAACAAAAQAAAAAIAAAF4) + splitter + + 1 + @Variant(AAAACQAAAAIAAAACAAAAQAAAAAIAAAG5) + splitter + + 1 + @Variant(AAAACQAAAAIAAAACAAABuQAAAAIAAAED) + splitter + + 2 + @Variant(AAAACQAAAAIAAAACAAAB7AAAAAIAAAEg) + splitter + + 1 + @Variant(AAAACQAAAAIAAAACAAAC4gAAAAIAAAK9) + splitter + + UAVGadgetManagerV1 + + + false + + + + ConfigGadget + + default + + uavGadget + + + + LineardialGadget + + Telemetry RX Rate Horizontal + + uavGadget + + + LineardialGadget + + Telemetry TX Rate Horizontal + + uavGadget + + 1 + @Variant(AAAACQAAAAA=) + splitter + + 2 + @Variant(AAAACQAAAAIAAAACAAACNQAAAAIAAABC) + splitter + + + + UAVObjectBrowser + + default + + uavGadget + + + GCSControlGadget + + MS Sidewinder + + uavGadget + + 2 + @Variant(AAAACQAAAAIAAAACAAABqgAAAAIAAAFi) + splitter + + 1 + @Variant(AAAACQAAAAIAAAACAAAC3gAAAAIAAAJ3) + splitter + + 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 + + + + ScopeGadget + + Accel + + uavGadget + + + ScopeGadget + + Raw Gyros + + uavGadget + + 2 + @Variant(AAAACQAAAAA=) + splitter + + + + + ScopeGadget + + Attitude + + uavGadget + + + ScopeGadget + + Uptimes + + uavGadget + + 2 + @Variant(AAAACQAAAAIAAAACAAABhgAAAAIAAAEO) + splitter + + + LoggingGadget + uavGadget + + 2 + @Variant(AAAACQAAAAIAAAACAAAClQAAAAIAAAB3) + splitter + + 1 + @Variant(AAAACQAAAAIAAAACAAACjQAAAAIAAAKU) + splitter + + UAVGadgetManagerV1 + + + false + + + + HITL + + XPlane HITL + + uavGadget + + + + GCSControlGadget + + MS Sidewinder + + uavGadget + + + + + LineardialGadget + + Pitch Desired + + uavGadget + + + LineardialGadget + + PitchActual + + uavGadget + + 1 + @Variant(AAAACQAAAAA=) + splitter + + + LineardialGadget + + Pitch + + uavGadget + + 1 + @Variant(AAAACQAAAAIAAAACAAABFAAAAAIAAABA) + splitter + + 1 + @Variant(AAAACQAAAAIAAAACAAAB6AAAAAIAAADC) + splitter + + 2 + @Variant(AAAACQAAAAIAAAACAAABaQAAAAIAAAEO) + splitter + + + UAVObjectBrowser + + default + + uavGadget + + 1 + @Variant(AAAACQAAAAIAAAACAAADDAAAAAIAAAJJ) + splitter + + UAVGadgetManagerV1 + + + false + + + Uploader + + default + + uavGadget + + + + + SystemHealthGadget + + default + + uavGadget + + + PFDGadget + + raw + + uavGadget + + 1 + @Variant(AAAACQAAAAIAAAACAAABQgAAAAIAAAGM) + splitter + + + ScopeGadget + + Uptimes + + uavGadget + + 2 + @Variant(AAAACQAAAAIAAAACAAABEgAAAAIAAAH6) + splitter + + 1 + @Variant(AAAACQAAAAA=) + 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/openpilot_logo_64.png + :/core/images/openpilot_logo_64.png + :/core/images/openpilot_logo_64.png + 6 + Flight data + Workspace10 + Configuration + Flight Planner + Scopes + HITL + Firmware + Workspace7 + Workspace8 + Workspace9 + + diff --git a/ground/openpilotgcs/src/plugins/coreplugin/core.qrc b/ground/openpilotgcs/src/plugins/coreplugin/core.qrc index 917018476..5c6d9c76b 100644 --- a/ground/openpilotgcs/src/plugins/coreplugin/core.qrc +++ b/ground/openpilotgcs/src/plugins/coreplugin/core.qrc @@ -50,7 +50,6 @@ images/optionsicon.png images/helpicon.png images/openpiloticon.png - OpenPilotGCS.ini CREDITS.html images/ah.png images/config.png @@ -60,5 +59,6 @@ images/scopes.png images/world.png images/cog.png + OpenPilotGCS.xml diff --git a/ground/openpilotgcs/src/plugins/coreplugin/mainwindow.cpp b/ground/openpilotgcs/src/plugins/coreplugin/mainwindow.cpp index 3a1fc324e..19df8dde2 100644 --- a/ground/openpilotgcs/src/plugins/coreplugin/mainwindow.cpp +++ b/ground/openpilotgcs/src/plugins/coreplugin/mainwindow.cpp @@ -30,6 +30,7 @@ #include "actioncontainer.h" #include "actionmanager_p.h" #include "basemode.h" +#include "connectionmanager.h" #include "coreimpl.h" #include "coreconstants.h" #include "fancytabwidget.h" @@ -39,35 +40,34 @@ #include "mimedatabase.h" #include "outputpane.h" #include "plugindialog.h" +#include "qxtlogger.h" +#include "qxtbasicstdloggerengine.h" #include "shortcutsettings.h" -#include "workspacesettings.h" -#include "modemanager.h" #include "uavgadgetmode.h" #include "uavgadgetmanager.h" #include "uavgadgetinstancemanager.h" -#include "connectionmanager.h" -#include "qxtlogger.h" -#include "qxtbasicstdloggerengine.h" +#include "workspacesettings.h" -#include "settingsdialog.h" -#include "variablemanager.h" -#include "threadmanager.h" -#include "versiondialog.h" #include "authorsdialog.h" -#include "viewmanager.h" -#include "uniqueidmanager.h" -#include "manhattanstyle.h" -#include "dialogs/iwizard.h" -#include "rightpane.h" #include "baseview.h" #include "ioutputpane.h" #include "icorelistener.h" #include "iconfigurableplugin.h" +#include "manhattanstyle.h" +#include "rightpane.h" +#include "settingsdialog.h" +#include "threadmanager.h" +#include "uniqueidmanager.h" +#include "variablemanager.h" +#include "versiondialog.h" +#include "viewmanager.h" #include +#include +#include "dialogs/iwizard.h" #include #include -#include +#include #include #include @@ -112,9 +112,9 @@ MainWindow::MainWindow() : m_globalContext(QList() << Constants::C_GLOBAL_ID), m_additionalContexts(m_globalContext), // keep this in sync with main() in app/main.cpp - m_settings(new QSettings(QSettings::IniFormat, QSettings::UserScope, + m_settings(new QSettings(XmlConfig::XmlSettingsFormat, QSettings::UserScope, QLatin1String("OpenPilot"), QLatin1String("OpenPilotGCS"), this)), - m_globalSettings(new QSettings(QSettings::IniFormat, QSettings::SystemScope, + m_globalSettings(new QSettings(XmlConfig::XmlSettingsFormat, QSettings::SystemScope, QLatin1String("OpenPilot"), QLatin1String("OpenPilotGCS"), this)), m_settingsDatabase(new SettingsDatabase(QFileInfo(m_settings->fileName()).path(), QLatin1String("OpenPilotGCS"), @@ -155,7 +155,7 @@ MainWindow::MainWindow() : QCoreApplication::setApplicationVersion(QLatin1String(Core::Constants::GCS_VERSION_LONG)); QCoreApplication::setOrganizationName(QLatin1String("OpenPilot")); QCoreApplication::setOrganizationDomain(QLatin1String("openpilot.org")); - QSettings::setDefaultFormat(QSettings::IniFormat); + QSettings::setDefaultFormat(XmlConfig::XmlSettingsFormat); QString baseName = qApp->style()->objectName(); #ifdef Q_WS_X11 if (baseName == QLatin1String("windows")) { @@ -284,7 +284,8 @@ void MainWindow::extensionsInitialized() { QSettings* qs = m_settings; - QSettings defaultSettings(":/core/OpenPilotGCS.ini", QSettings::IniFormat); + QSettings defaultSettings(":/core/OpenPilotGCS.xml", XmlConfig::XmlSettingsFormat); +// QSettings defaultSettings(":/core/OpenPilotGCS.ini", QSettings::IniFormat); if ( ! qs->allKeys().count() ){ QMessageBox msgBox; @@ -293,7 +294,7 @@ void MainWindow::extensionsInitialized() msgBox.setStandardButtons(QMessageBox::Yes | QMessageBox::No); msgBox.setDefaultButton(QMessageBox::Yes); if ( msgBox.exec() == QMessageBox::Yes ){ - qDebug() << "Load default config from resource /core/OpenPilotGCS.ini"; + qDebug() << "Load default config from resource /core/OpenPilotGCS.xml"; qs = &defaultSettings; } } diff --git a/ground/openpilotgcs/src/plugins/importexport/importexport.pro b/ground/openpilotgcs/src/plugins/importexport/importexport.pro index e3ae374a9..0d5d2778d 100644 --- a/ground/openpilotgcs/src/plugins/importexport/importexport.pro +++ b/ground/openpilotgcs/src/plugins/importexport/importexport.pro @@ -6,16 +6,14 @@ include(../../openpilotgcsplugin.pri) include(importexport_dependencies.pri) HEADERS += importexportplugin.h \ importexportgadgetwidget.h \ - importexportdialog.h \ - xmlconfig.h + importexportdialog.h HEADERS += importexportgadget.h HEADERS += importexportgadgetfactory.h HEADERS += importexportgadgetconfiguration.h HEADERS += importexportgadgetoptionspage.h SOURCES += importexportplugin.cpp \ importexportgadgetwidget.cpp \ - importexportdialog.cpp \ - xmlconfig.cpp + importexportdialog.cpp SOURCES += importexportgadget.cpp SOURCES += importexportgadgetfactory.cpp SOURCES += importexportgadgetconfiguration.cpp diff --git a/ground/openpilotgcs/src/plugins/importexport/importexportgadgetwidget.cpp b/ground/openpilotgcs/src/plugins/importexport/importexportgadgetwidget.cpp index da8a284af..eda567bde 100644 --- a/ground/openpilotgcs/src/plugins/importexport/importexportgadgetwidget.cpp +++ b/ground/openpilotgcs/src/plugins/importexport/importexportgadgetwidget.cpp @@ -28,7 +28,7 @@ */ #include "importexportgadgetwidget.h" #include "ui_importexportgadgetwidget.h" -#include "xmlconfig.h" +#include "utils/xmlconfig.h" #include "coreplugin/uavgadgetinstancemanager.h" #include "coreplugin/icore.h" #include From eb337c6e5c4b6f6dba7c3019886c42097dd37d6c Mon Sep 17 00:00:00 2001 From: David Carlson Date: Sun, 29 May 2011 21:07:22 -0700 Subject: [PATCH 6/6] Fix for tri yaw channel being reset. --- .../src/plugins/config/configairframewidget.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/ground/openpilotgcs/src/plugins/config/configairframewidget.cpp b/ground/openpilotgcs/src/plugins/config/configairframewidget.cpp index 27696457c..22f8f3560 100644 --- a/ground/openpilotgcs/src/plugins/config/configairframewidget.cpp +++ b/ground/openpilotgcs/src/plugins/config/configairframewidget.cpp @@ -2049,14 +2049,16 @@ void ConfigAirframeWidget::sendAircraftUpdate() m_aircraft->mrStatusLabel->setText("Error: Assign a Yaw channel"); return; } + // Need to setup motors first because setupMotors(..) will call resetActuators() + // and reset the Yaw channel to disabled. + motorList << "VTOLMotorNW" << "VTOLMotorNE" << "VTOLMotorS"; + setupMotors(motorList); + obj = dynamic_cast(getObjectManager()->getObject(QString("ActuatorSettings"))); Q_ASSERT(obj); field = obj->getField("FixedWingYaw1"); field->setValue(m_aircraft->triYawChannel->currentText()); - // No need to send a obj->updated() here because setupMotors - // will do it. - motorList << "VTOLMotorNW" << "VTOLMotorNE" << "VTOLMotorS"; - setupMotors(motorList); + obj->updated(); // Motor 1 to 6, Y6 Layout: // pitch roll yaw