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
07a9ab08
Commit
07a9ab08
authored
Jul 19, 2013
by
Michael Carpenter
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Addition of Retract/Neutral/Control angles to CameraGimbal config screen
parent
50d01b95
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
280 additions
and
10 deletions
+280
-10
CameraGimbalConfig.cc
src/ui/configuration/CameraGimbalConfig.cc
+47
-0
CameraGimbalConfig.h
src/ui/configuration/CameraGimbalConfig.h
+3
-1
CameraGimbalConfig.ui
src/ui/configuration/CameraGimbalConfig.ui
+230
-9
No files found.
src/ui/configuration/CameraGimbalConfig.cc
View file @
07a9ab08
...
@@ -95,7 +95,54 @@ CameraGimbalConfig::CameraGimbalConfig(QWidget *parent) : AP2ConfigWidget(parent
...
@@ -95,7 +95,54 @@ CameraGimbalConfig::CameraGimbalConfig(QWidget *parent) : AP2ConfigWidget(parent
connect
(
ui
.
shutterDurationSpinBox
,
SIGNAL
(
editingFinished
()),
this
,
SLOT
(
updateShutter
()));
connect
(
ui
.
shutterDurationSpinBox
,
SIGNAL
(
editingFinished
()),
this
,
SLOT
(
updateShutter
()));
connect
(
ui
.
shutterChannelComboBox
,
SIGNAL
(
currentIndexChanged
(
int
)),
this
,
SLOT
(
updateShutter
()));
connect
(
ui
.
shutterChannelComboBox
,
SIGNAL
(
currentIndexChanged
(
int
)),
this
,
SLOT
(
updateShutter
()));
connect
(
ui
.
retractXSpinBox
,
SIGNAL
(
editingFinished
()),
this
,
SLOT
(
updateRetractAngles
()));
connect
(
ui
.
retractYSpinBox
,
SIGNAL
(
editingFinished
()),
this
,
SLOT
(
updateRetractAngles
()));
connect
(
ui
.
retractZSpinBox
,
SIGNAL
(
editingFinished
()),
this
,
SLOT
(
updateRetractAngles
()));
connect
(
ui
.
controlXSpinBox
,
SIGNAL
(
editingFinished
()),
this
,
SLOT
(
updateControlAngles
()));
connect
(
ui
.
controlYSpinBox
,
SIGNAL
(
editingFinished
()),
this
,
SLOT
(
updateControlAngles
()));
connect
(
ui
.
controlZSpinBox
,
SIGNAL
(
editingFinished
()),
this
,
SLOT
(
updateControlAngles
()));
connect
(
ui
.
neutralXSpinBox
,
SIGNAL
(
editingFinished
()),
this
,
SLOT
(
updateNeutralAngles
()));
connect
(
ui
.
neutralYSpinBox
,
SIGNAL
(
editingFinished
()),
this
,
SLOT
(
updateNeutralAngles
()));
connect
(
ui
.
neutralZSpinBox
,
SIGNAL
(
editingFinished
()),
this
,
SLOT
(
updateNeutralAngles
()));
}
void
CameraGimbalConfig
::
updateRetractAngles
()
{
if
(
!
m_uas
)
{
showNullMAVErrorMessageBox
();
return
;
}
m_uas
->
getParamManager
()
->
setParameter
(
1
,
"MNT_RETRACT_X"
,
ui
.
retractXSpinBox
->
value
());
m_uas
->
getParamManager
()
->
setParameter
(
1
,
"MNT_RETRACT_Y"
,
ui
.
retractYSpinBox
->
value
());
m_uas
->
getParamManager
()
->
setParameter
(
1
,
"MNT_RETRACT_Z"
,
ui
.
retractZSpinBox
->
value
());
}
void
CameraGimbalConfig
::
updateNeutralAngles
()
{
if
(
!
m_uas
)
{
showNullMAVErrorMessageBox
();
return
;
}
m_uas
->
getParamManager
()
->
setParameter
(
1
,
"MNT_NEUTRAL_X"
,
ui
.
neutralXSpinBox
->
value
());
m_uas
->
getParamManager
()
->
setParameter
(
1
,
"MNT_NEUTRAL_Y"
,
ui
.
neutralYSpinBox
->
value
());
m_uas
->
getParamManager
()
->
setParameter
(
1
,
"MNT_NEUTRAL_Z"
,
ui
.
neutralZSpinBox
->
value
());
}
void
CameraGimbalConfig
::
updateControlAngles
()
{
if
(
!
m_uas
)
{
showNullMAVErrorMessageBox
();
return
;
}
m_uas
->
getParamManager
()
->
setParameter
(
1
,
"MNT_CONTROL_X"
,
ui
.
controlXSpinBox
->
value
());
m_uas
->
getParamManager
()
->
setParameter
(
1
,
"MNT_CONTROL_Y"
,
ui
.
controlYSpinBox
->
value
());
m_uas
->
getParamManager
()
->
setParameter
(
1
,
"MNT_CONTROL_Z"
,
ui
.
controlZSpinBox
->
value
());
}
}
void
CameraGimbalConfig
::
updateTilt
()
void
CameraGimbalConfig
::
updateTilt
()
...
...
src/ui/configuration/CameraGimbalConfig.h
View file @
07a9ab08
...
@@ -18,7 +18,9 @@ private slots:
...
@@ -18,7 +18,9 @@ private slots:
void
updateRoll
();
void
updateRoll
();
void
updatePan
();
void
updatePan
();
void
updateShutter
();
void
updateShutter
();
void
updateRetractAngles
();
void
updateNeutralAngles
();
void
updateControlAngles
();
private:
private:
Ui
::
CameraGimbalConfig
ui
;
Ui
::
CameraGimbalConfig
ui
;
QString
m_shutterPrefix
;
QString
m_shutterPrefix
;
...
...
src/ui/configuration/CameraGimbalConfig.ui
View file @
07a9ab08
...
@@ -123,7 +123,7 @@
...
@@ -123,7 +123,7 @@
<item
row=
"0"
column=
"3"
colspan=
"2"
>
<item
row=
"0"
column=
"3"
colspan=
"2"
>
<widget
class=
"QCheckBox"
name=
"tiltStabilizeCheckBox"
>
<widget
class=
"QCheckBox"
name=
"tiltStabilizeCheckBox"
>
<property
name=
"text"
>
<property
name=
"text"
>
<string>
CheckBox
</string>
<string>
Stabilize Tilt
</string>
</property>
</property>
</widget>
</widget>
</item>
</item>
...
@@ -191,7 +191,7 @@
...
@@ -191,7 +191,7 @@
<number>
100
</number>
<number>
100
</number>
</property>
</property>
<property
name=
"value"
>
<property
name=
"value"
>
<number>
-10
0
</number>
<number>
0
</number>
</property>
</property>
</widget>
</widget>
</item>
</item>
...
@@ -297,7 +297,7 @@
...
@@ -297,7 +297,7 @@
<item
row=
"0"
column=
"3"
colspan=
"2"
>
<item
row=
"0"
column=
"3"
colspan=
"2"
>
<widget
class=
"QCheckBox"
name=
"rollStabilizeCheckBox"
>
<widget
class=
"QCheckBox"
name=
"rollStabilizeCheckBox"
>
<property
name=
"text"
>
<property
name=
"text"
>
<string>
CheckBox
</string>
<string>
Stabilize Roll
</string>
</property>
</property>
</widget>
</widget>
</item>
</item>
...
@@ -471,7 +471,7 @@
...
@@ -471,7 +471,7 @@
<item
row=
"0"
column=
"3"
colspan=
"2"
>
<item
row=
"0"
column=
"3"
colspan=
"2"
>
<widget
class=
"QCheckBox"
name=
"panStabilizeCheckBox"
>
<widget
class=
"QCheckBox"
name=
"panStabilizeCheckBox"
>
<property
name=
"text"
>
<property
name=
"text"
>
<string>
CheckBox
</string>
<string>
Stabilize Pan
</string>
</property>
</property>
</widget>
</widget>
</item>
</item>
...
@@ -726,15 +726,236 @@
...
@@ -726,15 +726,236 @@
<widget
class=
"QGroupBox"
name=
"groupBox"
>
<widget
class=
"QGroupBox"
name=
"groupBox"
>
<property
name=
"geometry"
>
<property
name=
"geometry"
>
<rect>
<rect>
<x>
720
</x>
<x>
590
</x>
<y>
70
</y>
<y>
60
</y>
<width>
120
</width>
<width>
171
</width>
<height>
80
</height>
<height>
131
</height>
</rect>
</property>
<property
name=
"title"
>
<string>
Retract Angles
</string>
</property>
<layout
class=
"QVBoxLayout"
name=
"verticalLayout_3"
>
<item>
<layout
class=
"QHBoxLayout"
name=
"horizontalLayout"
>
<item>
<layout
class=
"QVBoxLayout"
name=
"verticalLayout"
>
<item>
<widget
class=
"QLabel"
name=
"label_33"
>
<property
name=
"text"
>
<string>
X
</string>
</property>
</widget>
</item>
<item>
<widget
class=
"QLabel"
name=
"label_41"
>
<property
name=
"text"
>
<string>
Y
</string>
</property>
</widget>
</item>
<item>
<widget
class=
"QLabel"
name=
"label_30"
>
<property
name=
"text"
>
<string>
Z
</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<layout
class=
"QVBoxLayout"
name=
"verticalLayout_2"
>
<item>
<widget
class=
"QSpinBox"
name=
"retractXSpinBox"
>
<property
name=
"minimum"
>
<number>
-180
</number>
</property>
<property
name=
"maximum"
>
<number>
180
</number>
</property>
</widget>
</item>
<item>
<widget
class=
"QSpinBox"
name=
"retractYSpinBox"
>
<property
name=
"minimum"
>
<number>
-180
</number>
</property>
<property
name=
"maximum"
>
<number>
180
</number>
</property>
</widget>
</item>
<item>
<widget
class=
"QSpinBox"
name=
"retractZSpinBox"
>
<property
name=
"minimum"
>
<number>
-180
</number>
</property>
<property
name=
"maximum"
>
<number>
180
</number>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</item>
</layout>
</widget>
<widget
class=
"QGroupBox"
name=
"groupBox_2"
>
<property
name=
"geometry"
>
<rect>
<x>
590
</x>
<y>
210
</y>
<width>
171
</width>
<height>
131
</height>
</rect>
</rect>
</property>
</property>
<property
name=
"title"
>
<property
name=
"title"
>
<string>
GroupBox
</string>
<string>
Neutral Angles
</string>
</property>
</property>
<layout
class=
"QVBoxLayout"
name=
"verticalLayout_4"
>
<item>
<layout
class=
"QHBoxLayout"
name=
"horizontalLayout_2"
>
<item>
<layout
class=
"QVBoxLayout"
name=
"verticalLayout_5"
>
<item>
<widget
class=
"QLabel"
name=
"label_42"
>
<property
name=
"text"
>
<string>
X
</string>
</property>
</widget>
</item>
<item>
<widget
class=
"QLabel"
name=
"label_43"
>
<property
name=
"text"
>
<string>
Y
</string>
</property>
</widget>
</item>
<item>
<widget
class=
"QLabel"
name=
"label_44"
>
<property
name=
"text"
>
<string>
Z
</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<layout
class=
"QVBoxLayout"
name=
"verticalLayout_6"
>
<item>
<widget
class=
"QSpinBox"
name=
"neutralXSpinBox"
>
<property
name=
"minimum"
>
<number>
-180
</number>
</property>
<property
name=
"maximum"
>
<number>
180
</number>
</property>
</widget>
</item>
<item>
<widget
class=
"QSpinBox"
name=
"neutralYSpinBox"
>
<property
name=
"minimum"
>
<number>
-180
</number>
</property>
<property
name=
"maximum"
>
<number>
180
</number>
</property>
</widget>
</item>
<item>
<widget
class=
"QSpinBox"
name=
"neutralZSpinBox"
>
<property
name=
"minimum"
>
<number>
-180
</number>
</property>
<property
name=
"maximum"
>
<number>
180
</number>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</item>
</layout>
</widget>
<widget
class=
"QGroupBox"
name=
"groupBox_3"
>
<property
name=
"geometry"
>
<rect>
<x>
590
</x>
<y>
360
</y>
<width>
171
</width>
<height>
131
</height>
</rect>
</property>
<property
name=
"title"
>
<string>
Control Angles
</string>
</property>
<layout
class=
"QVBoxLayout"
name=
"verticalLayout_7"
>
<item>
<layout
class=
"QHBoxLayout"
name=
"horizontalLayout_3"
>
<item>
<layout
class=
"QVBoxLayout"
name=
"verticalLayout_8"
>
<item>
<widget
class=
"QLabel"
name=
"label_45"
>
<property
name=
"text"
>
<string>
X
</string>
</property>
</widget>
</item>
<item>
<widget
class=
"QLabel"
name=
"label_46"
>
<property
name=
"text"
>
<string>
Y
</string>
</property>
</widget>
</item>
<item>
<widget
class=
"QLabel"
name=
"label_47"
>
<property
name=
"text"
>
<string>
Z
</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<layout
class=
"QVBoxLayout"
name=
"verticalLayout_9"
>
<item>
<widget
class=
"QSpinBox"
name=
"controlXSpinBox"
>
<property
name=
"minimum"
>
<number>
-180
</number>
</property>
<property
name=
"maximum"
>
<number>
180
</number>
</property>
</widget>
</item>
<item>
<widget
class=
"QSpinBox"
name=
"controlYSpinBox"
>
<property
name=
"minimum"
>
<number>
-180
</number>
</property>
<property
name=
"maximum"
>
<number>
180
</number>
</property>
</widget>
</item>
<item>
<widget
class=
"QSpinBox"
name=
"controlZSpinBox"
>
<property
name=
"minimum"
>
<number>
-180
</number>
</property>
<property
name=
"maximum"
>
<number>
180
</number>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</item>
</layout>
</widget>
</widget>
</widget>
</widget>
<resources>
<resources>
...
...
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