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
d440a4d6
Commit
d440a4d6
authored
Jun 28, 2013
by
Michael Carpenter
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Implementation of Optical Flow config
parent
6b3769f4
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
68 additions
and
5 deletions
+68
-5
BR-0016-01-3T.jpg
files/images/devices/BR-0016-01-3T.jpg
+0
-0
qgroundcontrol.qrc
qgroundcontrol.qrc
+1
-0
OpticalFlowConfig.cc
src/ui/configuration/OpticalFlowConfig.cc
+27
-2
OpticalFlowConfig.h
src/ui/configuration/OpticalFlowConfig.h
+5
-2
OpticalFlowConfig.ui
src/ui/configuration/OpticalFlowConfig.ui
+35
-1
No files found.
files/images/devices/BR-0016-01-3T.jpg
0 → 100644
View file @
d440a4d6
12.1 KB
qgroundcontrol.qrc
View file @
d440a4d6
...
...
@@ -113,6 +113,7 @@
<file>files/images/devices/BR-APMPWRDEAN-2.jpg</file>
<file>files/images/devices/AC-0004-11-2.jpg</file>
<file>files/images/devices/BR-0004-03-2.jpg</file>
<file>files/images/devices/BR-0016-01-3T.jpg</file>
</qresource>
<qresource prefix="/general">
<file alias="vera.ttf">files/styles/Vera.ttf</file>
...
...
src/ui/configuration/OpticalFlowConfig.cc
View file @
d440a4d6
#include "OpticalFlowConfig.h"
#include <QMessageBox>
OpticalFlowConfig
::
OpticalFlowConfig
(
QWidget
*
parent
)
:
QWidget
(
parent
)
OpticalFlowConfig
::
OpticalFlowConfig
(
QWidget
*
parent
)
:
AP2ConfigWidget
(
parent
)
{
ui
.
setupUi
(
this
);
connect
(
ui
.
enableCheckBox
,
SIGNAL
(
clicked
(
bool
)),
this
,
SLOT
(
enableCheckBoxClicked
(
bool
)));
}
OpticalFlowConfig
::~
OpticalFlowConfig
()
{
}
void
OpticalFlowConfig
::
parameterChanged
(
int
uas
,
int
component
,
QString
parameterName
,
QVariant
value
)
{
if
(
parameterName
==
"FLOW_ENABLE"
)
{
if
(
value
.
toInt
()
==
0
)
{
ui
.
enableCheckBox
->
setChecked
(
false
);
}
else
{
ui
.
enableCheckBox
->
setChecked
(
true
);
}
}
}
void
OpticalFlowConfig
::
enableCheckBoxClicked
(
bool
checked
)
{
if
(
!
m_uas
)
{
QMessageBox
::
information
(
0
,
tr
(
"Error"
),
tr
(
"Please connect to a MAV before attempting to set configuration"
));
return
;
}
m_uas
->
setParameter
(
0
,
"FLOW_ENABLE"
,
checked
?
1
:
0
);
}
src/ui/configuration/OpticalFlowConfig.h
View file @
d440a4d6
...
...
@@ -2,16 +2,19 @@
#define OPTICALFLOWCONFIG_H
#include <QWidget>
#include "AP2ConfigWidget.h"
#include "ui_OpticalFlowConfig.h"
class
OpticalFlowConfig
:
public
Q
Widget
class
OpticalFlowConfig
:
public
AP2Config
Widget
{
Q_OBJECT
public:
explicit
OpticalFlowConfig
(
QWidget
*
parent
=
0
);
~
OpticalFlowConfig
();
private
slots
:
void
parameterChanged
(
int
uas
,
int
component
,
QString
parameterName
,
QVariant
value
);
void
enableCheckBoxClicked
(
bool
checked
);
private:
Ui
::
OpticalFlowConfig
ui
;
};
...
...
src/ui/configuration/OpticalFlowConfig.ui
View file @
d440a4d6
...
...
@@ -29,7 +29,41 @@
<bool>
false
</bool>
</property>
</widget>
<widget
class=
"QCheckBox"
name=
"enableCheckBox"
>
<property
name=
"geometry"
>
<rect>
<x>
100
</x>
<y>
60
</y>
<width>
70
</width>
<height>
17
</height>
</rect>
</property>
<property
name=
"text"
>
<string>
Enable
</string>
</property>
</widget>
<widget
class=
"QLabel"
name=
"label_2"
>
<property
name=
"geometry"
>
<rect>
<x>
10
</x>
<y>
60
</y>
<width>
81
</width>
<height>
71
</height>
</rect>
</property>
<property
name=
"text"
>
<string/>
</property>
<property
name=
"pixmap"
>
<pixmap
resource=
"../../../qgroundcontrol.qrc"
>
:/files/images/devices/BR-0016-01-3T.jpg
</pixmap>
</property>
<property
name=
"scaledContents"
>
<bool>
true
</bool>
</property>
</widget>
</widget>
<resources/>
<resources>
<include
location=
"../../../qgroundcontrol.qrc"
/>
</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