LP-56 - Better txpid option namings, fix tabs-spaces, tooltips. headers, variable...
[librepilot.git] / ground / openpilotgcs / src / plugins / config / configrevowidget.h
blob5b19aa548b4d6ac8753428848d2aebf9b3b4775a
1 /**
2 ******************************************************************************
4 * @file configahrstwidget.h
5 * @author The OpenPilot Team, http://www.openpilot.org Copyright (C) 2010.
6 * @addtogroup GCSPlugins GCS Plugins
7 * @{
8 * @addtogroup ConfigPlugin Config Plugin
9 * @{
10 * @brief Telemetry configuration panel
11 *****************************************************************************/
13 * This program is free software; you can redistribute it and/or modify
14 * it under the terms of the GNU General Public License as published by
15 * the Free Software Foundation; either version 3 of the License, or
16 * (at your option) any later version.
18 * This program is distributed in the hope that it will be useful, but
19 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
20 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21 * for more details.
23 * You should have received a copy of the GNU General Public License along
24 * with this program; if not, write to the Free Software Foundation, Inc.,
25 * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
27 #ifndef CONFIGREVOWIDGET_H
28 #define CONFIGREVOWIDGET_H
30 #include "ui_revosensors.h"
31 #include "configtaskwidget.h"
32 #include "extensionsystem/pluginmanager.h"
33 #include "uavobjectmanager.h"
34 #include "uavobject.h"
35 #include "calibration/thermal/thermalcalibrationmodel.h"
36 #include "calibration/sixpointcalibrationmodel.h"
37 #include "calibration/levelcalibrationmodel.h"
38 #include "calibration/gyrobiascalibrationmodel.h"
40 #include <QWidget>
41 #include <QtSvg/QSvgRenderer>
42 #include <QtSvg/QGraphicsSvgItem>
43 #include <QList>
44 #include <QTimer>
45 #include <QMutex>
47 class Ui_Widget;
49 class ConfigRevoWidget : public ConfigTaskWidget {
50 Q_OBJECT
52 public:
53 ConfigRevoWidget(QWidget *parent = 0);
54 ~ConfigRevoWidget();
56 private:
57 OpenPilot::SixPointCalibrationModel *m_accelCalibrationModel;
58 OpenPilot::SixPointCalibrationModel *m_magCalibrationModel;
59 OpenPilot::LevelCalibrationModel *m_levelCalibrationModel;
60 OpenPilot::GyroBiasCalibrationModel *m_gyroBiasCalibrationModel;
61 OpenPilot::ThermalCalibrationModel *m_thermalCalibrationModel;
63 Ui_RevoSensorsWidget *m_ui;
65 // Board rotation store/recall
66 qint16 storedBoardRotation[3];
67 bool isBoardRotationStored;
69 private slots:
70 void storeAndClearBoardRotation();
71 void recallBoardRotation();
72 void displayVisualHelp(QString elementID);
73 void clearInstructions();
74 void addInstructions(QString text, WizardModel::MessageType type = WizardModel::Info);
75 void displayTemperature(float tempareture);
76 void displayTemperatureGradient(float temparetureGradient);
77 void displayTemperatureRange(float temparetureRange);
79 // ! Overriden method from the configTaskWidget to update UI
80 virtual void refreshWidgetsValues(UAVObject *object = NULL);
81 virtual void updateObjectsFromWidgets();
83 // Slot for clearing home location
84 void clearHomeLocation();
86 void disableAllCalibrations();
87 void enableAllCalibrations();
89 void updateVisualHelp();
91 protected:
92 void showEvent(QShowEvent *event);
93 void resizeEvent(QResizeEvent *event);
96 #endif // ConfigRevoWidget_H