2 ******************************************************************************
4 * @file levelcalibrationmodel.h
5 * @author The OpenPilot Team, http://www.openpilot.org Copyright (C) 2014.
6 * @addtogroup board level calibration
8 * @addtogroup ConfigPlugin Config Plugin
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
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
28 #ifndef LEVELCALIBRATIONMODEL_H
29 #define LEVELCALIBRATIONMODEL_H
31 #include "wizardmodel.h"
32 #include "calibration/calibrationutils.h"
33 #include <attitudestate.h>
34 #include <attitudesettings.h>
41 class LevelCalibrationModel
: public QObject
{
45 explicit LevelCalibrationModel(QObject
*parent
= 0);
55 void savePositionEnabledChanged(bool state
);
56 void progressChanged(int value
);
57 void displayVisualHelp(QString elementID
);
58 void displayInstructions(QString text
, WizardModel::MessageType type
= WizardModel::Info
);
66 void getSample(UAVObject
*obj
);
70 UAVObject::Metadata attitudeStateMdata
;
73 QMutex sensorsUpdateLock
;
81 QList
<double> rot_accum_roll
;
82 QList
<double> rot_accum_pitch
;
84 double rot_data_pitch
;
86 // convenience pointers
87 AttitudeState
*attitudeState
;
88 AttitudeSettings
*attitudeSettings
;
90 UAVObjectManager
*getObjectManager();
94 #endif // LEVELCALIBRATIONMODEL_H