Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Q
qgroundcontrol
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Valentin Platzgummer
qgroundcontrol
Commits
274b20d8
Commit
274b20d8
authored
Jun 20, 2013
by
Michael Carpenter
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Change for layout of configuration widgets, and start of implmentation of RadioCalibration Widget
parent
632ddad3
Changes
12
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
840 additions
and
37 deletions
+840
-37
BR-HMC5883-01-2.jpg
files/images/devices/BR-HMC5883-01-2.jpg
+0
-0
qgroundcontrol.qrc
qgroundcontrol.qrc
+4
-0
AccelCalibrationConfig.ui
src/ui/configuration/AccelCalibrationConfig.ui
+31
-4
ApmHardwareConfig.cc
src/ui/configuration/ApmHardwareConfig.cc
+30
-0
ApmHardwareConfig.h
src/ui/configuration/ApmHardwareConfig.h
+31
-0
CompassConfig.ui
src/ui/configuration/CompassConfig.ui
+167
-6
FrameTypeConfig.cc
src/ui/configuration/FrameTypeConfig.cc
+49
-0
FrameTypeConfig.h
src/ui/configuration/FrameTypeConfig.h
+38
-2
FrameTypeConfig.ui
src/ui/configuration/FrameTypeConfig.ui
+91
-19
RadioCalibrationConfig.cc
src/ui/configuration/RadioCalibrationConfig.cc
+100
-0
RadioCalibrationConfig.h
src/ui/configuration/RadioCalibrationConfig.h
+50
-2
RadioCalibrationConfig.ui
src/ui/configuration/RadioCalibrationConfig.ui
+249
-4
No files found.
files/images/devices/BR-HMC5883-01-2.jpg
0 → 100644
View file @
274b20d8
14.2 KB
qgroundcontrol.qrc
View file @
274b20d8
...
...
@@ -106,6 +106,10 @@
<file>files/images/apm_planner_logo_splash.png</file>
<file>files/images/apm_planner_2_0-07.png</file>
<file>files/images/apm_planner_2_0-08.png</file>
<file>files/images/mavs/frames_plus.png</file>
<file>files/images/mavs/frames_x.png</file>
<file>files/images/mavs/frames-05.png</file>
<file>files/images/devices/BR-HMC5883-01-2.jpg</file>
</qresource>
<qresource prefix="/general">
<file alias="vera.ttf">files/styles/Vera.ttf</file>
...
...
src/ui/configuration/AccelCalibrationConfig.ui
View file @
274b20d8
...
...
@@ -6,8 +6,8 @@
<rect>
<x>
0
</x>
<y>
0
</y>
<width>
400
</width>
<height>
3
00
</height>
<width>
576
</width>
<height>
3
54
</height>
</rect>
</property>
<property
name=
"windowTitle"
>
...
...
@@ -16,8 +16,8 @@
<widget
class=
"QLabel"
name=
"label"
>
<property
name=
"geometry"
>
<rect>
<x>
2
0
</x>
<y>
2
0
</y>
<x>
1
0
</x>
<y>
0
</y>
<width>
231
</width>
<height>
31
</height>
</rect>
...
...
@@ -29,6 +29,33 @@
<bool>
false
</bool>
</property>
</widget>
<widget
class=
"QPushButton"
name=
"calibrateAccelButton"
>
<property
name=
"geometry"
>
<rect>
<x>
60
</x>
<y>
60
</y>
<width>
81
</width>
<height>
31
</height>
</rect>
</property>
<property
name=
"text"
>
<string>
Calibrate
Accelerometer
</string>
</property>
</widget>
<widget
class=
"QLabel"
name=
"label_2"
>
<property
name=
"geometry"
>
<rect>
<x>
40
</x>
<y>
120
</y>
<width>
161
</width>
<height>
51
</height>
</rect>
</property>
<property
name=
"text"
>
<string/>
</property>
</widget>
</widget>
<resources/>
<connections/>
...
...
src/ui/configuration/ApmHardwareConfig.cc
View file @
274b20d8
/*=====================================================================
QGroundControl Open Source Ground Control Station
(c) 2013 Michael Carpenter (malcom2073@gmail.com)
This file is part of the QGROUNDCONTROL project
QGROUNDCONTROL 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.
QGROUNDCONTROL 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 QGROUNDCONTROL. If not, see <http://www.gnu.org/licenses/>.
======================================================================*/
/**
* @file
* @brief APM Hardware Configuration widget source.
*
* @author Michael Carpenter <malcom2073@gmail.com>
*
*/
#include "ApmHardwareConfig.h"
...
...
src/ui/configuration/ApmHardwareConfig.h
View file @
274b20d8
/*=====================================================================
QGroundControl Open Source Ground Control Station
(c) 2013 Michael Carpenter (malcom2073@gmail.com)
This file is part of the QGROUNDCONTROL project
QGROUNDCONTROL 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.
QGROUNDCONTROL 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 QGROUNDCONTROL. If not, see <http://www.gnu.org/licenses/>.
======================================================================*/
/**
* @file
* @brief APM Hardware Configuration widget header.
*
* @author Michael Carpenter <malcom2073@gmail.com>
*
*/
#ifndef APMHARDWARECONFIG_H
#define APMHARDWARECONFIG_H
...
...
src/ui/configuration/CompassConfig.ui
View file @
274b20d8
...
...
@@ -6,8 +6,8 @@
<rect>
<x>
0
</x>
<y>
0
</y>
<width>
400
</width>
<height>
300
</height>
<width>
565
</width>
<height>
241
</height>
</rect>
</property>
<property
name=
"windowTitle"
>
...
...
@@ -16,9 +16,9 @@
<widget
class=
"QLabel"
name=
"label"
>
<property
name=
"geometry"
>
<rect>
<x>
3
0
</x>
<y>
2
0
</y>
<width>
13
1
</width>
<x>
1
0
</x>
<y>
0
</y>
<width>
52
1
</width>
<height>
31
</height>
</rect>
</property>
...
...
@@ -29,7 +29,168 @@
<bool>
false
</bool>
</property>
</widget>
<widget
class=
"QLabel"
name=
"label_4"
>
<property
name=
"geometry"
>
<rect>
<x>
230
</x>
<y>
100
</y>
<width>
101
</width>
<height>
16
</height>
</rect>
</property>
<property
name=
"text"
>
<string>
<
a href=
"
http://magnetic-declination.com/
">
Declination Website
<
/a
>
</string>
</property>
</widget>
<widget
class=
"QComboBox"
name=
"comboBox"
>
<property
name=
"geometry"
>
<rect>
<x>
280
</x>
<y>
120
</y>
<width>
201
</width>
<height>
22
</height>
</rect>
</property>
</widget>
<widget
class=
"QPushButton"
name=
"pushButton"
>
<property
name=
"geometry"
>
<rect>
<x>
300
</x>
<y>
180
</y>
<width>
91
</width>
<height>
23
</height>
</rect>
</property>
<property
name=
"text"
>
<string>
Live Calibration
</string>
</property>
</widget>
<widget
class=
"QPushButton"
name=
"pushButton_2"
>
<property
name=
"geometry"
>
<rect>
<x>
390
</x>
<y>
180
</y>
<width>
91
</width>
<height>
23
</height>
</rect>
</property>
<property
name=
"text"
>
<string>
Log Calibration
</string>
</property>
</widget>
<widget
class=
"QLabel"
name=
"label_6"
>
<property
name=
"geometry"
>
<rect>
<x>
340
</x>
<y>
160
</y>
<width>
91
</width>
<height>
16
</height>
</rect>
</property>
<property
name=
"text"
>
<string>
Advanced Config
</string>
</property>
</widget>
<widget
class=
"QWidget"
name=
"horizontalLayoutWidget_2"
>
<property
name=
"geometry"
>
<rect>
<x>
220
</x>
<y>
70
</y>
<width>
321
</width>
<height>
31
</height>
</rect>
</property>
<layout
class=
"QHBoxLayout"
name=
"horizontalLayout_3"
>
<item>
<widget
class=
"QLineEdit"
name=
"lineEdit"
/>
</item>
<item>
<widget
class=
"QLabel"
name=
"label_3"
>
<property
name=
"text"
>
<string>
in Degrees eg 2* 3' W is -2.3
</string>
</property>
</widget>
</item>
</layout>
</widget>
<widget
class=
"QWidget"
name=
"horizontalLayoutWidget"
>
<property
name=
"geometry"
>
<rect>
<x>
10
</x>
<y>
70
</y>
<width>
201
</width>
<height>
111
</height>
</rect>
</property>
<layout
class=
"QHBoxLayout"
name=
"horizontalLayout"
>
<item>
<widget
class=
"QLabel"
name=
"label_2"
>
<property
name=
"maximumSize"
>
<size>
<width>
100
</width>
<height>
100
</height>
</size>
</property>
<property
name=
"text"
>
<string/>
</property>
<property
name=
"pixmap"
>
<pixmap
resource=
"../../../qgroundcontrol.qrc"
>
:/files/images/devices/BR-HMC5883-01-2.jpg
</pixmap>
</property>
<property
name=
"scaledContents"
>
<bool>
true
</bool>
</property>
</widget>
</item>
<item>
<layout
class=
"QVBoxLayout"
name=
"verticalLayout"
>
<item>
<widget
class=
"QCheckBox"
name=
"enableCheckBox"
>
<property
name=
"text"
>
<string>
Enable
</string>
</property>
</widget>
</item>
<item>
<widget
class=
"QCheckBox"
name=
"autoDecCheckBox"
>
<property
name=
"text"
>
<string>
Auto Declination
</string>
</property>
</widget>
</item>
<item>
<spacer
name=
"verticalSpacer"
>
<property
name=
"orientation"
>
<enum>
Qt::Vertical
</enum>
</property>
<property
name=
"sizeHint"
stdset=
"0"
>
<size>
<width>
20
</width>
<height>
40
</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
</layout>
</widget>
<widget
class=
"QLabel"
name=
"label_5"
>
<property
name=
"geometry"
>
<rect>
<x>
220
</x>
<y>
120
</y>
<width>
54
</width>
<height>
20
</height>
</rect>
</property>
<property
name=
"text"
>
<string>
Orientation
</string>
</property>
</widget>
</widget>
<resources/>
<resources>
<include
location=
"../../../qgroundcontrol.qrc"
/>
</resources>
<connections/>
</ui>
src/ui/configuration/FrameTypeConfig.cc
View file @
274b20d8
/*=====================================================================
QGroundControl Open Source Ground Control Station
(c) 2013 Michael Carpenter (malcom2073@gmail.com)
This file is part of the QGROUNDCONTROL project
QGROUNDCONTROL 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.
QGROUNDCONTROL 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 QGROUNDCONTROL. If not, see <http://www.gnu.org/licenses/>.
======================================================================*/
/**
* @file
* @brief Airframe type configuration widget source.
*
* @author Michael Carpenter <malcom2073@gmail.com>
*
*/
#include "FrameTypeConfig.h"
FrameTypeConfig
::
FrameTypeConfig
(
QWidget
*
parent
)
:
QWidget
(
parent
)
{
ui
.
setupUi
(
this
);
connect
(
ui
.
plusRadioButton
,
SIGNAL
(
clicked
()),
this
,
SLOT
(
plusFrameSelected
()));
connect
(
ui
.
xRadioButton
,
SIGNAL
(
clicked
()),
this
,
SLOT
(
xFrameSelected
()));
connect
(
ui
.
vRadioButton
,
SIGNAL
(
clicked
()),
this
,
SLOT
(
vFrameSelected
()));
//connect(UASManager::instance()->getActiveUAS()->getParamManager(),SIGNAL(parameterListUpToDate(int))
}
FrameTypeConfig
::~
FrameTypeConfig
()
{
}
void
FrameTypeConfig
::
xFrameSelected
()
{
}
void
FrameTypeConfig
::
plusFrameSelected
()
{
}
void
FrameTypeConfig
::
vFrameSelected
()
{
}
src/ui/configuration/FrameTypeConfig.h
View file @
274b20d8
/*=====================================================================
QGroundControl Open Source Ground Control Station
(c) 2013 Michael Carpenter (malcom2073@gmail.com)
This file is part of the QGROUNDCONTROL project
QGROUNDCONTROL 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.
QGROUNDCONTROL 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 QGROUNDCONTROL. If not, see <http://www.gnu.org/licenses/>.
======================================================================*/
/**
* @file
* @brief Airframe type configuration widget header.
*
* @author Michael Carpenter <malcom2073@gmail.com>
*
*/
#ifndef FRAMETYPECONFIG_H
#define FRAMETYPECONFIG_H
#include <QWidget>
#include "ui_FrameTypeConfig.h"
#include "UASInterface.h"
#include "UASManager.h"
#include "QGCUASParamManager.h"
class
FrameTypeConfig
:
public
QWidget
{
Q_OBJECT
...
...
@@ -11,7 +44,10 @@ class FrameTypeConfig : public QWidget
public:
explicit
FrameTypeConfig
(
QWidget
*
parent
=
0
);
~
FrameTypeConfig
();
private
slots
:
void
xFrameSelected
();
void
plusFrameSelected
();
void
vFrameSelected
();
private:
Ui
::
FrameTypeConfig
ui
;
};
...
...
src/ui/configuration/FrameTypeConfig.ui
View file @
274b20d8
...
...
@@ -6,30 +6,102 @@
<rect>
<x>
0
</x>
<y>
0
</y>
<width>
400
</width>
<height>
300
</height>
<width>
553
</width>
<height>
497
</height>
</rect>
</property>
<property
name=
"windowTitle"
>
<string>
Form
</string>
</property>
<widget
class=
"QLabel"
name=
"label"
>
<property
name=
"geometry"
>
<rect>
<x>
20
</x>
<y>
20
</y>
<width>
131
</width>
<height>
31
</height>
</rect>
</property>
<property
name=
"text"
>
<string>
<
h2
>
Frame Setup
<
/h2
>
</string>
</property>
<property
name=
"scaledContents"
>
<bool>
false
</bool>
</property>
</widget>
<layout
class=
"QVBoxLayout"
name=
"verticalLayout_2"
>
<item>
<widget
class=
"QLabel"
name=
"label"
>
<property
name=
"text"
>
<string>
<
h2
>
Frame Setup
<
/h2
>
</string>
</property>
<property
name=
"scaledContents"
>
<bool>
false
</bool>
</property>
</widget>
</item>
<item>
<layout
class=
"QVBoxLayout"
name=
"verticalLayout"
>
<item>
<widget
class=
"QRadioButton"
name=
"plusRadioButton"
>
<property
name=
"text"
>
<string>
'Plus' Style
</string>
</property>
<property
name=
"icon"
>
<iconset
resource=
"../../../qgroundcontrol.qrc"
>
<normaloff>
:/files/images/mavs/frames_plus.png
</normaloff>
:/files/images/mavs/frames_plus.png
</iconset>
</property>
<property
name=
"iconSize"
>
<size>
<width>
300
</width>
<height>
150
</height>
</size>
</property>
</widget>
</item>
<item>
<widget
class=
"QRadioButton"
name=
"xRadioButton"
>
<property
name=
"text"
>
<string>
'X' Style
</string>
</property>
<property
name=
"icon"
>
<iconset
resource=
"../../../qgroundcontrol.qrc"
>
<normaloff>
:/files/images/mavs/frames_x.png
</normaloff>
:/files/images/mavs/frames_x.png
</iconset>
</property>
<property
name=
"iconSize"
>
<size>
<width>
300
</width>
<height>
150
</height>
</size>
</property>
</widget>
</item>
<item>
<widget
class=
"QRadioButton"
name=
"vRadioButton"
>
<property
name=
"layoutDirection"
>
<enum>
Qt::LeftToRight
</enum>
</property>
<property
name=
"autoFillBackground"
>
<bool>
false
</bool>
</property>
<property
name=
"text"
>
<string>
'V' Style
</string>
</property>
<property
name=
"icon"
>
<iconset
resource=
"../../../qgroundcontrol.qrc"
>
<normaloff>
:/files/images/mavs/frames-05.png
</normaloff>
:/files/images/mavs/frames-05.png
</iconset>
</property>
<property
name=
"iconSize"
>
<size>
<width>
300
</width>
<height>
120
</height>
</size>
</property>
</widget>
</item>
</layout>
</item>
<item>
<spacer
name=
"verticalSpacer"
>
<property
name=
"orientation"
>
<enum>
Qt::Vertical
</enum>
</property>
<property
name=
"sizeHint"
stdset=
"0"
>
<size>
<width>
20
</width>
<height>
40
</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
<resources/>
<resources>
<include
location=
"../../../qgroundcontrol.qrc"
/>
</resources>
<connections/>
</ui>
src/ui/configuration/RadioCalibrationConfig.cc
View file @
274b20d8
/*=====================================================================
QGroundControl Open Source Ground Control Station
(c) 2013 Michael Carpenter (malcom2073@gmail.com)
This file is part of the QGROUNDCONTROL project
QGROUNDCONTROL 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.
QGROUNDCONTROL 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 QGROUNDCONTROL. If not, see <http://www.gnu.org/licenses/>.
======================================================================*/
/**
* @file
* @brief Radio Calibration Configuration source.
*
* @author Michael Carpenter <malcom2073@gmail.com>
*
*/
#include "RadioCalibrationConfig.h"
RadioCalibrationConfig
::
RadioCalibrationConfig
(
QWidget
*
parent
)
:
QWidget
(
parent
)
{
ui
.
setupUi
(
this
);
m_uas
=
0
;
m_calibrationEnabled
=
false
;
connect
(
UASManager
::
instance
(),
SIGNAL
(
activeUASSet
(
UASInterface
*
)),
this
,
SLOT
(
setActiveUAS
(
UASInterface
*
)));
setActiveUAS
(
UASManager
::
instance
()
->
getActiveUAS
());
ui
.
rollWidget
->
setMin
(
800
);
ui
.
rollWidget
->
setMax
(
2200
);
ui
.
pitchWidget
->
setMin
(
800
);
ui
.
pitchWidget
->
setMax
(
2200
);
ui
.
throttleWidget
->
setMin
(
800
);
ui
.
throttleWidget
->
setMax
(
2200
);
ui
.
yawWidget
->
setMin
(
800
);
ui
.
yawWidget
->
setMax
(
2200
);
guiUpdateTimer
=
new
QTimer
(
this
);
connect
(
guiUpdateTimer
,
SIGNAL
(
timeout
()),
this
,
SLOT
(
guiUpdateTimerTick
()));
}
RadioCalibrationConfig
::~
RadioCalibrationConfig
()
{
}
void
RadioCalibrationConfig
::
setActiveUAS
(
UASInterface
*
uas
)
{
if
(
uas
==
NULL
)
return
;
if
(
m_uas
)
{
// Disconnect old system
disconnect
(
m_uas
,
SIGNAL
(
remoteControlChannelRawChanged
(
int
,
float
)),
this
,
SLOT
(
remoteControlChannelRawChanged
(
int
,
float
)));
disconnect
(
m_uas
,
SIGNAL
(
parameterChanged
(
int
,
int
,
QString
,
QVariant
)),
this
,
SLOT
(
parameterChanged
(
int
,
int
,
QString
,
QVariant
)));
}
}
void
RadioCalibrationConfig
::
remoteControlChannelRawChanged
(
int
chan
,
float
val
)
{
//Channel is 0-7 typically?
//Val will be 0-3000, PWM value.
if
(
m_calibrationEnabled
)
{
if
(
val
<
rcMin
[
chan
])
{
rcMin
[
chan
]
=
val
;
}
if
(
val
>
rcMax
[
chan
])
{
rcMax
[
chan
]
=
val
;
}
}
// Raw value
rcValue
[
chan
]
=
val
;
}
void
RadioCalibrationConfig
::
parameterChanged
(
int
uas
,
int
component
,
QString
parameterName
,
QVariant
value
)
{
}
void
RadioCalibrationConfig
::
guiUpdateTimerTick
()
{
ui
.
rollWidget
->
setValue
(
rcValue
[
0
]);
ui
.
pitchWidget
->
setValue
(
rcValue
[
1
]);
ui
.
throttleWidget
->
setValue
(
rcValue
[
2
]);
ui
.
yawWidget
->
setValue
(
rcValue
[
3
]);
ui
.
radio5Widget
->
setValue
(
rcValue
[
4
]);
ui
.
radio6Widget
->
setValue
(
rcValue
[
5
]);
ui
.
radio7Widget
->
setValue
(
rcValue
[
6
]);
ui
.
radio8Widget
->
setValue
(
rcValue
[
7
]);
}
void
RadioCalibrationConfig
::
showEvent
(
QShowEvent
*
event
)
{
guiUpdateTimer
->
stop
();
}
void
RadioCalibrationConfig
::
hideEvent
(
QHideEvent
*
event
)
{
guiUpdateTimer
->
start
(
100
);
}
src/ui/configuration/RadioCalibrationConfig.h
View file @
274b20d8
/*=====================================================================
QGroundControl Open Source Ground Control Station
(c) 2013 Michael Carpenter (malcom2073@gmail.com)
This file is part of the QGROUNDCONTROL project
QGROUNDCONTROL 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.
QGROUNDCONTROL 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 QGROUNDCONTROL. If not, see <http://www.gnu.org/licenses/>.
======================================================================*/
/**
* @file
* @brief Radio Calibration Configuration widget header.
*
* @author Michael Carpenter <malcom2073@gmail.com>
*
*/
#ifndef RADIOCALIBRATIONCONFIG_H
#define RADIOCALIBRATIONCONFIG_H
#include <QWidget>
#include <QTimer>
#include <QShowEvent>
#include <QHideEvent>
#include "ui_RadioCalibrationConfig.h"
#include "UASManager.h"
#include "UASInterface.h"
class
RadioCalibrationConfig
:
public
QWidget
{
Q_OBJECT
...
...
@@ -11,8 +46,21 @@ class RadioCalibrationConfig : public QWidget
public:
explicit
RadioCalibrationConfig
(
QWidget
*
parent
=
0
);
~
RadioCalibrationConfig
();
protected:
void
showEvent
(
QShowEvent
*
event
);
void
hideEvent
(
QHideEvent
*
event
);
private
slots
:
void
setActiveUAS
(
UASInterface
*
uas
);
void
remoteControlChannelRawChanged
(
int
chan
,
float
val
);
void
parameterChanged
(
int
uas
,
int
component
,
QString
parameterName
,
QVariant
value
);
void
guiUpdateTimerTick
();
private:
double
rcMin
[
8
];
double
rcMax
[
8
];
double
rcValue
[
8
];
QTimer
*
guiUpdateTimer
;
bool
m_calibrationEnabled
;
UASInterface
*
m_uas
;
Ui
::
RadioCalibrationConfig
ui
;
};
...
...
src/ui/configuration/RadioCalibrationConfig.ui
View file @
274b20d8
...
...
@@ -6,8 +6,8 @@
<rect>
<x>
0
</x>
<y>
0
</y>
<width>
400
</width>
<height>
3
00
</height>
<width>
771
</width>
<height>
3
89
</height>
</rect>
</property>
<property
name=
"windowTitle"
>
...
...
@@ -16,8 +16,8 @@
<widget
class=
"QLabel"
name=
"label"
>
<property
name=
"geometry"
>
<rect>
<x>
2
0
</x>
<y>
2
0
</y>
<x>
1
0
</x>
<y>
1
0
</y>
<width>
171
</width>
<height>
31
</height>
</rect>
...
...
@@ -29,7 +29,252 @@
<bool>
false
</bool>
</property>
</widget>
<widget
class=
"QWidget"
name=
"layoutWidget"
>
<property
name=
"geometry"
>
<rect>
<x>
10
</x>
<y>
50
</y>
<width>
716
</width>
<height>
300
</height>
</rect>
</property>
<layout
class=
"QVBoxLayout"
name=
"verticalLayout_15"
>
<property
name=
"sizeConstraint"
>
<enum>
QLayout::SetMinAndMaxSize
</enum>
</property>
<item>
<layout
class=
"QHBoxLayout"
name=
"horizontalLayout_10"
>
<item>
<widget
class=
"QGCRadioChannelDisplay"
name=
"rollWidget"
native=
"true"
>
<property
name=
"minimumSize"
>
<size>
<width>
250
</width>
<height>
40
</height>
</size>
</property>
<property
name=
"maximumSize"
>
<size>
<width>
250
</width>
<height>
40
</height>
</size>
</property>
</widget>
</item>
<item>
<spacer
name=
"horizontalSpacer_6"
>
<property
name=
"orientation"
>
<enum>
Qt::Horizontal
</enum>
</property>
<property
name=
"sizeHint"
stdset=
"0"
>
<size>
<width>
40
</width>
<height>
20
</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
<item>
<layout
class=
"QHBoxLayout"
name=
"horizontalLayout_13"
stretch=
"2,1,2,2,2,0"
>
<item>
<spacer
name=
"horizontalSpacer_12"
>
<property
name=
"orientation"
>
<enum>
Qt::Horizontal
</enum>
</property>
<property
name=
"sizeHint"
stdset=
"0"
>
<size>
<width>
40
</width>
<height>
20
</height>
</size>
</property>
</spacer>
</item>
<item>
<widget
class=
"QGCRadioChannelDisplay"
name=
"pitchWidget"
native=
"true"
>
<property
name=
"minimumSize"
>
<size>
<width>
50
</width>
<height>
200
</height>
</size>
</property>
<property
name=
"maximumSize"
>
<size>
<width>
50
</width>
<height>
200
</height>
</size>
</property>
</widget>
</item>
<item>
<spacer
name=
"horizontalSpacer_11"
>
<property
name=
"orientation"
>
<enum>
Qt::Horizontal
</enum>
</property>
<property
name=
"sizeHint"
stdset=
"0"
>
<size>
<width>
250
</width>
<height>
20
</height>
</size>
</property>
</spacer>
</item>
<item>
<widget
class=
"QGCRadioChannelDisplay"
name=
"throttleWidget"
native=
"true"
>
<property
name=
"minimumSize"
>
<size>
<width>
50
</width>
<height>
200
</height>
</size>
</property>
<property
name=
"maximumSize"
>
<size>
<width>
50
</width>
<height>
200
</height>
</size>
</property>
</widget>
</item>
<item>
<spacer
name=
"horizontalSpacer_10"
>
<property
name=
"orientation"
>
<enum>
Qt::Horizontal
</enum>
</property>
<property
name=
"sizeHint"
stdset=
"0"
>
<size>
<width>
40
</width>
<height>
20
</height>
</size>
</property>
</spacer>
</item>
<item>
<layout
class=
"QVBoxLayout"
name=
"verticalLayout_6"
>
<item>
<widget
class=
"QGCRadioChannelDisplay"
name=
"radio5Widget"
native=
"true"
>
<property
name=
"minimumSize"
>
<size>
<width>
250
</width>
<height>
40
</height>
</size>
</property>
<property
name=
"maximumSize"
>
<size>
<width>
250
</width>
<height>
40
</height>
</size>
</property>
</widget>
</item>
<item>
<widget
class=
"QGCRadioChannelDisplay"
name=
"radio6Widget"
native=
"true"
>
<property
name=
"minimumSize"
>
<size>
<width>
250
</width>
<height>
40
</height>
</size>
</property>
<property
name=
"maximumSize"
>
<size>
<width>
250
</width>
<height>
40
</height>
</size>
</property>
</widget>
</item>
<item>
<widget
class=
"QGCRadioChannelDisplay"
name=
"radio7Widget"
native=
"true"
>
<property
name=
"minimumSize"
>
<size>
<width>
250
</width>
<height>
40
</height>
</size>
</property>
<property
name=
"maximumSize"
>
<size>
<width>
250
</width>
<height>
40
</height>
</size>
</property>
</widget>
</item>
<item>
<widget
class=
"QGCRadioChannelDisplay"
name=
"radio8Widget"
native=
"true"
>
<property
name=
"minimumSize"
>
<size>
<width>
250
</width>
<height>
40
</height>
</size>
</property>
<property
name=
"maximumSize"
>
<size>
<width>
250
</width>
<height>
40
</height>
</size>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</item>
<item>
<layout
class=
"QHBoxLayout"
name=
"horizontalLayout_12"
>
<item>
<widget
class=
"QGCRadioChannelDisplay"
name=
"yawWidget"
native=
"true"
>
<property
name=
"minimumSize"
>
<size>
<width>
250
</width>
<height>
40
</height>
</size>
</property>
<property
name=
"maximumSize"
>
<size>
<width>
250
</width>
<height>
40
</height>
</size>
</property>
</widget>
</item>
<item>
<spacer
name=
"horizontalSpacer_7"
>
<property
name=
"orientation"
>
<enum>
Qt::Horizontal
</enum>
</property>
<property
name=
"sizeHint"
stdset=
"0"
>
<size>
<width>
40
</width>
<height>
20
</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
</layout>
</widget>
<widget
class=
"QPushButton"
name=
"calibrateButton"
>
<property
name=
"geometry"
>
<rect>
<x>
20
</x>
<y>
360
</y>
<width>
75
</width>
<height>
23
</height>
</rect>
</property>
<property
name=
"text"
>
<string>
Calibrate
</string>
</property>
</widget>
</widget>
<customwidgets>
<customwidget>
<class>
QGCRadioChannelDisplay
</class>
<extends>
QWidget
</extends>
<header>
ui/designer/QGCRadioChannelDisplay.h
</header>
<container>
1
</container>
</customwidget>
</customwidgets>
<resources/>
<connections/>
</ui>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment