mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-01-18 03:52:11 +01:00
OP-38 Template for AHRS calibration panel.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1395 ebee16cc-31ac-478f-84a7-5cbb03baadba
This commit is contained in:
parent
e3108c36ad
commit
0d640a69c9
102
ground/src/plugins/config/ahrs.ui
Normal file
102
ground/src/plugins/config/ahrs.ui
Normal file
@ -0,0 +1,102 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>AHRSWidget</class>
|
||||
<widget class="QWidget" name="AHRSWidget">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>720</width>
|
||||
<height>480</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Form</string>
|
||||
</property>
|
||||
<widget class="QFrame" name="frame">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>10</x>
|
||||
<y>10</y>
|
||||
<width>411</width>
|
||||
<height>321</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::StyledPanel</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Raised</enum>
|
||||
</property>
|
||||
<widget class="QTextBrowser" name="textBrowser">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>10</x>
|
||||
<y>10</y>
|
||||
<width>361</width>
|
||||
<height>151</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="html">
|
||||
<string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
|
||||
<html><head><meta name="qrichtext" content="1" /><style type="text/css">
|
||||
p, li { white-space: pre-wrap; }
|
||||
</style></head><body style=" font-family:'Sans'; font-size:10pt; font-weight:400; font-style:normal;">
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">This panel will be where you setup your AHRS. For now it is just a placeholder, please be patient!</p></body></html></string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QPushButton" name="saveTelemetryToRAM">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>190</x>
|
||||
<y>280</y>
|
||||
<width>93</width>
|
||||
<height>27</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Send to OpenPilot but don't write in SD.
|
||||
Beware of not locking yourself out!</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Save to RAM</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QPushButton" name="getTelemetryCurrent">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>80</x>
|
||||
<y>280</y>
|
||||
<width>93</width>
|
||||
<height>27</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Retrieve settings from OpenPilot</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Get Current</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QPushButton" name="saveTelemetryToSD">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>300</x>
|
||||
<y>280</y>
|
||||
<width>93</width>
|
||||
<height>27</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Applies and Saves all settings to SD.
|
||||
Beware of not locking yourself out!</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Save to SD</string>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
@ -14,7 +14,8 @@ HEADERS += configplugin.h \
|
||||
configservowidget.h \
|
||||
configtaskwidget.h \
|
||||
configairframewidget.h \
|
||||
configtelemetrywidget.h
|
||||
configtelemetrywidget.h \
|
||||
configahrswidget.h
|
||||
SOURCES += configplugin.cpp \
|
||||
configgadgetconfiguration.cpp \
|
||||
configgadgetwidget.cpp \
|
||||
@ -25,8 +26,10 @@ SOURCES += configplugin.cpp \
|
||||
configtaskwidget.cpp \
|
||||
configservowidget.cpp \
|
||||
configairframewidget.cpp \
|
||||
configtelemetrywidget.cpp
|
||||
configtelemetrywidget.cpp \
|
||||
configahrswidget.cpp
|
||||
FORMS += settingswidget.ui \
|
||||
airframe.ui \
|
||||
telemetry.ui
|
||||
telemetry.ui \
|
||||
ahrs.ui
|
||||
RESOURCES += configgadget.qrc
|
||||
|
52
ground/src/plugins/config/configahrswidget.cpp
Normal file
52
ground/src/plugins/config/configahrswidget.cpp
Normal file
@ -0,0 +1,52 @@
|
||||
/**
|
||||
******************************************************************************
|
||||
*
|
||||
* @file configahrswidget.h
|
||||
* @author E. Lafargue & The OpenPilot Team, http://www.openpilot.org Copyright (C) 2010.
|
||||
* @addtogroup GCSPlugins GCS Plugins
|
||||
* @{
|
||||
* @addtogroup ConfigPlugin Config Plugin
|
||||
* @{
|
||||
* @brief The Configuration Gadget used to update settings in the firmware
|
||||
*****************************************************************************/
|
||||
/*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along
|
||||
* with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
#include "configahrswidget.h"
|
||||
|
||||
#include <QDebug>
|
||||
#include <QStringList>
|
||||
#include <QtGui/QWidget>
|
||||
#include <QtGui/QTextEdit>
|
||||
#include <QtGui/QVBoxLayout>
|
||||
#include <QtGui/QPushButton>
|
||||
|
||||
|
||||
|
||||
ConfigAHRSWidget::ConfigAHRSWidget(QWidget *parent) : ConfigTaskWidget(parent)
|
||||
{
|
||||
m_ahrs = new Ui_AHRSWidget();
|
||||
m_ahrs->setupUi(this);
|
||||
|
||||
|
||||
}
|
||||
|
||||
ConfigAHRSWidget::~ConfigAHRSWidget()
|
||||
{
|
||||
// Do nothing
|
||||
}
|
||||
|
||||
|
||||
|
54
ground/src/plugins/config/configahrswidget.h
Normal file
54
ground/src/plugins/config/configahrswidget.h
Normal file
@ -0,0 +1,54 @@
|
||||
/**
|
||||
******************************************************************************
|
||||
*
|
||||
* @file configahrstwidget.h
|
||||
* @author The OpenPilot Team, http://www.openpilot.org Copyright (C) 2010.
|
||||
* @addtogroup GCSPlugins GCS Plugins
|
||||
* @{
|
||||
* @addtogroup ConfigPlugin Config Plugin
|
||||
* @{
|
||||
* @brief Telemetry configuration panel
|
||||
*****************************************************************************/
|
||||
/*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along
|
||||
* with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
#ifndef CONFIGAHRSWIDGET_H
|
||||
#define CONFIGAHRSWIDGET_H
|
||||
|
||||
#include "ui_ahrs.h"
|
||||
#include "configtaskwidget.h"
|
||||
#include "extensionsystem/pluginmanager.h"
|
||||
#include "uavobjects/uavobjectmanager.h"
|
||||
#include "uavobjects/uavobject.h"
|
||||
#include <QtGui/QWidget>
|
||||
#include <QList>
|
||||
|
||||
|
||||
class ConfigAHRSWidget: public ConfigTaskWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
ConfigAHRSWidget(QWidget *parent = 0);
|
||||
~ConfigAHRSWidget();
|
||||
|
||||
private:
|
||||
Ui_AHRSWidget *m_ahrs;
|
||||
|
||||
private slots:
|
||||
|
||||
};
|
||||
|
||||
#endif // ConfigAHRSWidget_H
|
@ -30,6 +30,7 @@
|
||||
#include "configservowidget.h"
|
||||
#include "configairframewidget.h"
|
||||
#include "configtelemetrywidget.h"
|
||||
#include "configahrswidget.h"
|
||||
|
||||
#include <QDebug>
|
||||
#include <QStringList>
|
||||
@ -54,6 +55,8 @@ ConfigGadgetWidget::ConfigGadgetWidget(QWidget *parent) : QWidget(parent)
|
||||
ftw->insertTab(1, qwd, QIcon(":/configgadget/images/Airframe.png"), QString("Aircraft"));
|
||||
qwd = new ConfigTelemetryWidget();
|
||||
ftw->insertTab(2,qwd,QIcon(":/configgadget/images/XBee.svg"), QString("Telemetry"));
|
||||
qwd = new ConfigAHRSWidget();
|
||||
ftw->insertTab(3,qwd,QIcon(":/core/images/plugin.png"),QString("AHRS"));
|
||||
|
||||
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user