2011-12-24 20:57:10 +01:00
|
|
|
/**
|
|
|
|
******************************************************************************
|
|
|
|
*
|
|
|
|
* @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 CONFIGREVOWIDGET_H
|
|
|
|
#define CONFIGREVOWIDGET_H
|
|
|
|
|
|
|
|
#include "ui_revosensors.h"
|
|
|
|
#include "configtaskwidget.h"
|
|
|
|
#include "extensionsystem/pluginmanager.h"
|
|
|
|
#include "uavobjectmanager.h"
|
|
|
|
#include "uavobject.h"
|
2014-06-14 18:14:10 +02:00
|
|
|
#include "calibration/thermal/thermalcalibrationmodel.h"
|
|
|
|
#include "calibration/sixpointcalibrationmodel.h"
|
|
|
|
#include "calibration/levelcalibrationmodel.h"
|
|
|
|
#include "calibration/gyrobiascalibrationmodel.h"
|
|
|
|
|
2013-09-15 23:06:25 +02:00
|
|
|
#include <QWidget>
|
2011-12-24 20:57:10 +01:00
|
|
|
#include <QtSvg/QSvgRenderer>
|
|
|
|
#include <QtSvg/QGraphicsSvgItem>
|
|
|
|
#include <QList>
|
|
|
|
#include <QTimer>
|
|
|
|
#include <QMutex>
|
2011-12-24 22:56:16 +01:00
|
|
|
|
2014-06-14 18:14:10 +02:00
|
|
|
class Ui_Widget;
|
2014-04-09 19:57:23 +02:00
|
|
|
|
2013-05-12 11:27:12 +02:00
|
|
|
class ConfigRevoWidget : public ConfigTaskWidget {
|
2011-12-24 20:57:10 +01:00
|
|
|
Q_OBJECT
|
2014-04-11 00:46:44 +02:00
|
|
|
|
2011-12-24 20:57:10 +01:00
|
|
|
public:
|
|
|
|
ConfigRevoWidget(QWidget *parent = 0);
|
|
|
|
~ConfigRevoWidget();
|
2013-05-12 11:27:12 +02:00
|
|
|
|
2011-12-24 20:57:10 +01:00
|
|
|
private:
|
2014-05-30 19:01:25 +02:00
|
|
|
OpenPilot::SixPointCalibrationModel *m_accelCalibrationModel;
|
|
|
|
OpenPilot::SixPointCalibrationModel *m_magCalibrationModel;
|
2014-04-11 01:45:36 +02:00
|
|
|
OpenPilot::LevelCalibrationModel *m_levelCalibrationModel;
|
2014-04-11 05:41:39 +02:00
|
|
|
OpenPilot::GyroBiasCalibrationModel *m_gyroBiasCalibrationModel;
|
2014-05-30 19:01:25 +02:00
|
|
|
OpenPilot::ThermalCalibrationModel *m_thermalCalibrationModel;
|
2014-04-11 01:45:36 +02:00
|
|
|
|
2011-12-24 20:57:10 +01:00
|
|
|
Ui_RevoSensorsWidget *m_ui;
|
2012-06-14 04:26:24 +02:00
|
|
|
|
2013-05-12 11:27:12 +02:00
|
|
|
// Board rotation store/recall
|
|
|
|
qint16 storedBoardRotation[3];
|
|
|
|
bool isBoardRotationStored;
|
2014-04-11 00:46:44 +02:00
|
|
|
|
|
|
|
private slots:
|
2013-05-12 11:27:12 +02:00
|
|
|
void storeAndClearBoardRotation();
|
|
|
|
void recallBoardRotation();
|
2014-05-22 21:22:54 +02:00
|
|
|
void displayVisualHelp(QString elementID);
|
2014-05-25 20:14:26 +02:00
|
|
|
void clearInstructions();
|
2014-05-28 23:07:31 +02:00
|
|
|
void addInstructions(QString text, WizardModel::MessageType type = WizardModel::Info);
|
2014-06-13 00:40:55 +02:00
|
|
|
void displayTemperature(float tempareture);
|
|
|
|
void displayTemperatureGradient(float temparetureGradient);
|
|
|
|
void displayTemperatureRange(float temparetureRange);
|
2013-05-12 11:27:12 +02:00
|
|
|
|
|
|
|
// ! Overriden method from the configTaskWidget to update UI
|
|
|
|
virtual void refreshWidgetsValues(UAVObject *object = NULL);
|
2014-05-30 15:09:07 +02:00
|
|
|
virtual void updateObjectsFromWidgets();
|
2012-06-14 06:07:23 +02:00
|
|
|
|
2013-05-12 11:27:12 +02:00
|
|
|
// Slot for clearing home location
|
|
|
|
void clearHomeLocation();
|
|
|
|
|
2014-04-10 17:30:33 +02:00
|
|
|
void disableAllCalibrations();
|
|
|
|
void enableAllCalibrations();
|
|
|
|
|
2014-05-13 01:08:54 +02:00
|
|
|
void updateVisualHelp();
|
|
|
|
|
2011-12-24 20:57:10 +01:00
|
|
|
protected:
|
|
|
|
void showEvent(QShowEvent *event);
|
|
|
|
void resizeEvent(QResizeEvent *event);
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // ConfigRevoWidget_H
|