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
e3afbf8b
Commit
e3afbf8b
authored
Jul 12, 2013
by
Michael Carpenter
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Addition of orientation combo box for compass config
parent
1bd6a3e6
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
46 additions
and
5 deletions
+46
-5
CompassConfig.cc
src/ui/configuration/CompassConfig.cc
+41
-0
CompassConfig.ui
src/ui/configuration/CompassConfig.ui
+4
-4
SonarConfig.ui
src/ui/configuration/SonarConfig.ui
+1
-1
No files found.
src/ui/configuration/CompassConfig.cc
View file @
e3afbf8b
...
...
@@ -16,6 +16,33 @@ CompassConfig::CompassConfig(QWidget *parent) : QWidget(parent)
connect
(
UASManager
::
instance
(),
SIGNAL
(
activeUASSet
(
UASInterface
*
)),
this
,
SLOT
(
activeUASSet
(
UASInterface
*
)));
activeUASSet
(
UASManager
::
instance
()
->
getActiveUAS
());
ui
.
orientationComboBox
->
addItem
(
"ROTATION_NONE"
);
ui
.
orientationComboBox
->
addItem
(
"ROTATION_YAW_45"
);
ui
.
orientationComboBox
->
addItem
(
"ROTATION_YAW_90"
);
ui
.
orientationComboBox
->
addItem
(
"ROTATION_YAW_135"
);
ui
.
orientationComboBox
->
addItem
(
"ROTATION_YAW_180"
);
ui
.
orientationComboBox
->
addItem
(
"ROTATION_YAW_225"
);
ui
.
orientationComboBox
->
addItem
(
"ROTATION_YAW_270"
);
ui
.
orientationComboBox
->
addItem
(
"ROTATION_YAW_315"
);
ui
.
orientationComboBox
->
addItem
(
"ROTATION_ROLL_180"
);
ui
.
orientationComboBox
->
addItem
(
"ROTATION_ROLL_180_YAW_45"
);
ui
.
orientationComboBox
->
addItem
(
"ROTATION_ROLL_180_YAW_90"
);
ui
.
orientationComboBox
->
addItem
(
"ROTATION_ROLL_180_YAW_135"
);
ui
.
orientationComboBox
->
addItem
(
"ROTATION_PITCH_180"
);
ui
.
orientationComboBox
->
addItem
(
"ROTATION_ROLL_180_YAW_225"
);
ui
.
orientationComboBox
->
addItem
(
"ROTATION_ROLL_180_YAW_270"
);
ui
.
orientationComboBox
->
addItem
(
"ROTATION_ROLL_180_YAW_315"
);
ui
.
orientationComboBox
->
addItem
(
"ROTATION_ROLL_90"
);
ui
.
orientationComboBox
->
addItem
(
"ROTATION_ROLL_90_YAW_45"
);
ui
.
orientationComboBox
->
addItem
(
"ROTATION_ROLL_90_YAW_90"
);
ui
.
orientationComboBox
->
addItem
(
"ROTATION_ROLL_90_YAW_135"
);
ui
.
orientationComboBox
->
addItem
(
"ROTATION_ROLL_270"
);
ui
.
orientationComboBox
->
addItem
(
"ROTATION_ROLL_270_YAW_45"
);
ui
.
orientationComboBox
->
addItem
(
"ROTATION_ROLL_270_YAW_90"
);
ui
.
orientationComboBox
->
addItem
(
"ROTATION_ROLL_270_YAW_135"
);
ui
.
orientationComboBox
->
addItem
(
"ROTATION_PITCH_90"
);
ui
.
orientationComboBox
->
addItem
(
"ROTATION_PITCH_270"
);
ui
.
orientationComboBox
->
addItem
(
"ROTATION_MAX"
);
}
CompassConfig
::~
CompassConfig
()
{
...
...
@@ -39,12 +66,14 @@ void CompassConfig::parameterChanged(int uas, int component, QString parameterNa
ui
.
enableCheckBox
->
setChecked
(
false
);
ui
.
autoDecCheckBox
->
setEnabled
(
false
);
ui
.
declinationLineEdit
->
setEnabled
(
false
);
ui
.
orientationComboBox
->
setEnabled
(
false
);
}
else
{
ui
.
enableCheckBox
->
setChecked
(
true
);
ui
.
autoDecCheckBox
->
setEnabled
(
true
);
ui
.
declinationLineEdit
->
setEnabled
(
true
);
ui
.
orientationComboBox
->
setEnabled
(
true
);
}
ui
.
enableCheckBox
->
setEnabled
(
true
);
}
...
...
@@ -63,6 +92,12 @@ void CompassConfig::parameterChanged(int uas, int component, QString parameterNa
{
ui
.
declinationLineEdit
->
setText
(
QString
::
number
(
value
.
toDouble
()));
}
else
if
(
parameterName
==
"COMPASS_ORIENT"
)
{
disconnect
(
ui
.
orientationComboBox
,
SIGNAL
(
currentIndexChanged
(
int
)),
this
,
SLOT
(
orientationComboChanged
(
int
)));
ui
.
orientationComboBox
->
setCurrentIndex
(
value
.
toInt
());
connect
(
ui
.
orientationComboBox
,
SIGNAL
(
currentIndexChanged
(
int
)),
this
,
SLOT
(
orientationComboChanged
(
int
)));
}
}
void
CompassConfig
::
enableClicked
(
bool
enabled
)
...
...
@@ -104,5 +139,11 @@ void CompassConfig::autoDecClicked(bool enabled)
void
CompassConfig
::
orientationComboChanged
(
int
index
)
{
//COMPASS_ORIENT
if
(
!
m_uas
)
{
return
;
}
m_uas
->
getParamManager
()
->
setParameter
(
1
,
"COMPASS_ORIENT"
,
index
);
}
src/ui/configuration/CompassConfig.ui
View file @
e3afbf8b
...
...
@@ -55,9 +55,9 @@
<widget
class=
"QPushButton"
name=
"pushButton"
>
<property
name=
"geometry"
>
<rect>
<x>
30
0
</x>
<x>
29
0
</x>
<y>
180
</y>
<width>
9
1
</width>
<width>
10
1
</width>
<height>
23
</height>
</rect>
</property>
...
...
@@ -70,7 +70,7 @@
<rect>
<x>
390
</x>
<y>
180
</y>
<width>
9
1
</width>
<width>
10
1
</width>
<height>
23
</height>
</rect>
</property>
...
...
@@ -118,7 +118,7 @@
<rect>
<x>
10
</x>
<y>
70
</y>
<width>
2
0
1
</width>
<width>
2
1
1
</width>
<height>
111
</height>
</rect>
</property>
...
...
src/ui/configuration/SonarConfig.ui
View file @
e3afbf8b
...
...
@@ -58,7 +58,7 @@
</rect>
</property>
<property
name=
"text"
>
<string>
CheckBox
</string>
<string>
Enable
</string>
</property>
</widget>
<widget
class=
"QComboBox"
name=
"sonarTypeComboBox"
>
...
...
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