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
4decb8d6
Commit
4decb8d6
authored
Jun 28, 2013
by
Michael Carpenter
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Implementation of OSD Configuration
parent
d440a4d6
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
86 additions
and
7 deletions
+86
-7
MinimOSD.jpg
files/images/devices/MinimOSD.jpg
+0
-0
qgroundcontrol.qrc
qgroundcontrol.qrc
+1
-0
OsdConfig.cc
src/ui/configuration/OsdConfig.cc
+28
-2
OsdConfig.h
src/ui/configuration/OsdConfig.h
+4
-2
OsdConfig.ui
src/ui/configuration/OsdConfig.ui
+53
-3
No files found.
files/images/devices/MinimOSD.jpg
0 → 100644
View file @
4decb8d6
40.4 KB
qgroundcontrol.qrc
View file @
4decb8d6
...
@@ -114,6 +114,7 @@
...
@@ -114,6 +114,7 @@
<file>files/images/devices/AC-0004-11-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-0004-03-2.jpg</file>
<file>files/images/devices/BR-0016-01-3T.jpg</file>
<file>files/images/devices/BR-0016-01-3T.jpg</file>
<file>files/images/devices/MinimOSD.jpg</file>
</qresource>
</qresource>
<qresource prefix="/general">
<qresource prefix="/general">
<file alias="vera.ttf">files/styles/Vera.ttf</file>
<file alias="vera.ttf">files/styles/Vera.ttf</file>
...
...
src/ui/configuration/OsdConfig.cc
View file @
4decb8d6
#include "OsdConfig.h"
#include "OsdConfig.h"
#include <QMessageBox>
OsdConfig
::
OsdConfig
(
QWidget
*
parent
)
:
AP2ConfigWidget
(
parent
)
OsdConfig
::
OsdConfig
(
QWidget
*
parent
)
:
QWidget
(
parent
)
{
{
ui
.
setupUi
(
this
);
ui
.
setupUi
(
this
);
connect
(
ui
.
enablePushButton
,
SIGNAL
(
clicked
()),
this
,
SLOT
(
enableButtonClicked
()));
}
}
OsdConfig
::~
OsdConfig
()
OsdConfig
::~
OsdConfig
()
{
{
}
}
void
OsdConfig
::
enableButtonClicked
()
{
if
(
!
m_uas
)
{
QMessageBox
::
information
(
0
,
tr
(
"Error"
),
tr
(
"Please connect to a MAV before attempting to set configuration"
));
return
;
}
m_uas
->
setParameter
(
0
,
"SR0_EXT_STAT"
,
2
);
m_uas
->
setParameter
(
0
,
"SR0_EXTRA1"
,
10
);
m_uas
->
setParameter
(
0
,
"SR0_EXTRA2"
,
10
);
m_uas
->
setParameter
(
0
,
"SR0_EXTRA3"
,
2
);
m_uas
->
setParameter
(
0
,
"SR0_POSITION"
,
3
);
m_uas
->
setParameter
(
0
,
"SR0_RAW_CTRL"
,
2
);
m_uas
->
setParameter
(
0
,
"SR0_RAW_SENS"
,
2
);
m_uas
->
setParameter
(
0
,
"SR0_RC_CHAN"
,
2
);
m_uas
->
setParameter
(
0
,
"SR3_EXT_STAT"
,
2
);
m_uas
->
setParameter
(
0
,
"SR3_EXTRA1"
,
10
);
m_uas
->
setParameter
(
0
,
"SR3_EXTRA2"
,
10
);
m_uas
->
setParameter
(
0
,
"SR3_EXTRA3"
,
2
);
m_uas
->
setParameter
(
0
,
"SR3_POSITION"
,
3
);
m_uas
->
setParameter
(
0
,
"SR3_RAW_CTRL"
,
2
);
m_uas
->
setParameter
(
0
,
"SR3_RAW_SENS"
,
2
);
m_uas
->
setParameter
(
0
,
"SR3_RC_CHAN"
,
2
);
}
src/ui/configuration/OsdConfig.h
View file @
4decb8d6
...
@@ -2,16 +2,18 @@
...
@@ -2,16 +2,18 @@
#define OSDCONFIG_H
#define OSDCONFIG_H
#include <QWidget>
#include <QWidget>
#include "AP2ConfigWidget.h"
#include "ui_OsdConfig.h"
#include "ui_OsdConfig.h"
class
OsdConfig
:
public
Q
Widget
class
OsdConfig
:
public
AP2Config
Widget
{
{
Q_OBJECT
Q_OBJECT
public:
public:
explicit
OsdConfig
(
QWidget
*
parent
=
0
);
explicit
OsdConfig
(
QWidget
*
parent
=
0
);
~
OsdConfig
();
~
OsdConfig
();
private
slots
:
void
enableButtonClicked
();
private:
private:
Ui
::
OsdConfig
ui
;
Ui
::
OsdConfig
ui
;
};
};
...
...
src/ui/configuration/OsdConfig.ui
View file @
4decb8d6
...
@@ -6,8 +6,8 @@
...
@@ -6,8 +6,8 @@
<rect>
<rect>
<x>
0
</x>
<x>
0
</x>
<y>
0
</y>
<y>
0
</y>
<width>
4
00
</width>
<width>
4
99
</width>
<height>
300
</height>
<height>
243
</height>
</rect>
</rect>
</property>
</property>
<property
name=
"windowTitle"
>
<property
name=
"windowTitle"
>
...
@@ -29,7 +29,57 @@
...
@@ -29,7 +29,57 @@
<bool>
false
</bool>
<bool>
false
</bool>
</property>
</property>
</widget>
</widget>
<widget
class=
"QLabel"
name=
"label_2"
>
<property
name=
"geometry"
>
<rect>
<x>
10
</x>
<y>
60
</y>
<width>
101
</width>
<height>
41
</height>
</rect>
</property>
<property
name=
"text"
>
<string/>
</property>
<property
name=
"pixmap"
>
<pixmap
resource=
"../../../qgroundcontrol.qrc"
>
:/files/images/devices/MinimOSD.jpg
</pixmap>
</property>
<property
name=
"scaledContents"
>
<bool>
true
</bool>
</property>
</widget>
<widget
class=
"QLabel"
name=
"label_3"
>
<property
name=
"geometry"
>
<rect>
<x>
230
</x>
<y>
60
</y>
<width>
191
</width>
<height>
41
</height>
</rect>
</property>
<property
name=
"text"
>
<string>
You only need to use this if you are
having issue with your OSD not
updating
</string>
</property>
</widget>
<widget
class=
"QPushButton"
name=
"enablePushButton"
>
<property
name=
"geometry"
>
<rect>
<x>
120
</x>
<y>
60
</y>
<width>
91
</width>
<height>
41
</height>
</rect>
</property>
<property
name=
"text"
>
<string>
Enable
Telemetry
</string>
</property>
</widget>
</widget>
</widget>
<resources/>
<resources>
<include
location=
"../../../qgroundcontrol.qrc"
/>
</resources>
<connections/>
<connections/>
</ui>
</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