dRonin  adbada4
dRonin GCS
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Groups Pages
configattitudewidget.h
Go to the documentation of this file.
1 
14 /*
15  * This program is free software; you can redistribute it and/or modify
16  * it under the terms of the GNU General Public License as published by
17  * the Free Software Foundation; either version 3 of the License, or
18  * (at your option) any later version.
19  *
20  * This program is distributed in the hope that it will be useful, but
21  * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
22  * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
23  * for more details.
24  *
25  * You should have received a copy of the GNU General Public License along
26  * with this program; if not, see <http://www.gnu.org/licenses/>
27  *
28  * Additional note on redistribution: The copyright and license notices above
29  * must be maintained in each individual source file that is a derivative work
30  * of this source file; otherwise redistribution is prohibited.
31  */
32 #ifndef CONFIGATTITUDEWIDGET_H
33 #define CONFIGATTITUDEWIDGET_H
34 
35 #include "ui_attitude.h"
36 #include "calibration.h"
37 
41 #include "uavobjects/uavobject.h"
42 #include "calibration.h"
43 #include <QWidget>
44 #include <QSvgRenderer>
45 #include <QGraphicsSvgItem>
46 #include <QList>
47 #include <QTimer>
48 #include <memory>
49 
50 class Ui_Widget;
51 
53 {
54  Q_OBJECT
55 
56 public:
57  ConfigAttitudeWidget(QWidget *parent = nullptr);
59 
60 protected:
61  void showEvent(QShowEvent *event);
62  void resizeEvent(QResizeEvent *event);
63 
65 
66 private:
67  std::unique_ptr<Ui_AttitudeWidget> m_ui;
68  QGraphicsSvgItem *paperplane;
69 
70  int phaseCounter;
71  const static double maxVarValue;
72  const static int calibrationDelay = 10;
73 
74  float initialMagCorrectionRate;
75 
76  QMap<QString, UAVObject::Metadata> originalMetaData;
77 
78 private slots:
80  virtual void refreshWidgetsValues(UAVObject *obj = nullptr);
81 
83  void displayPlane(int i);
84 
85  // Slots for measuring the sensor noise
86  void do_SetDirty();
87  void configureSixPoint();
88  void onCalibrationBusy(bool busy);
89  void updateCalibrationEnabled();
90 };
91 
92 #endif // CONFIGATTITUDEWIDGET_H
void showEvent(QShowEvent *event)
The Calibration class is a UI free algorithm that can be connected to any interfaces. As such it only communicates with the UI via signals and slots, but has no direct handles to any particular controls or widgets.
Definition: calibration.h:46
ConfigAttitudeWidget(QWidget *parent=nullptr)
void resizeEvent(QResizeEvent *event)
for i
Definition: OPPlots.m:140
Gui-less support class for calibration.