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
d5f5922c
Commit
d5f5922c
authored
Dec 29, 2010
by
pixhawk
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Working on better param interface, improving/fixing simulation link
parent
1b2b89a5
Changes
8
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
262 additions
and
5 deletions
+262
-5
qgroundcontrol-plugins.pro
qgroundcontrol-plugins.pro
+45
-0
MAVLinkSimulationLink.cc
src/comm/MAVLinkSimulationLink.cc
+4
-4
QGCParamSlider.cc
src/ui/designer/QGCParamSlider.cc
+26
-0
QGCParamSlider.h
src/ui/designer/QGCParamSlider.h
+26
-0
QGCParamSlider.ui
src/ui/designer/QGCParamSlider.ui
+48
-0
QGCParamSliderPlugin.cc
src/ui/designer/QGCParamSliderPlugin.cc
+81
-0
QGCParamSliderPlugin.h
src/ui/designer/QGCParamSliderPlugin.h
+31
-0
MAV2DIcon.cc
src/ui/map/MAV2DIcon.cc
+1
-1
No files found.
qgroundcontrol-plugins.pro
0 → 100644
View file @
d5f5922c
# -------------------------------------------------
#
QGroundControl
-
Micro
Air
Vehicle
Groundstation
#
Please
see
our
website
at
<
http
://
qgroundcontrol
.
org
>
#
Author
:
#
Lorenz
Meier
<
mavteam
@
student
.
ethz
.
ch
>
#
(
c
)
2009
-
2010
PIXHAWK
Team
#
This
file
is
part
of
the
mav
groundstation
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
/>.
#
-------------------------------------------------
#
Include
QMapControl
map
library
#
prefer
version
from
external
directory
/
#
from
http
://
github
.
com
/
pixhawk
/
qmapcontrol
/
#
over
bundled
version
in
lib
directory
#
Version
from
GIT
repository
is
preferred
#
include
(
"../qmapcontrol/QMapControl/QMapControl.pri"
)
#
{
#
Include
bundled
version
if
necessary
CONFIG
+=
designer
plugin
TARGET
=
$$
qtLibraryTarget
(
$$
TARGET
)
TEMPLATE
=
lib
QTDIR_build
:
DESTDIR
=
$$
QT_BUILD_TREE
/
plugins
/
designer
FORMS
=
src
/
ui
/
designer
/
QGCParamSlider
.
ui
HEADERS
=
src
/
ui
/
designer
/
QGCParamSlider
.
h
\
src
/
ui
/
designer
/
QGCParamSliderPlugin
.
h
SOURCES
=
src
/
ui
/
designer
/
QGCParamSlider
.
cc
\
src
/
ui
/
designer
/
QGCParamSliderPlugin
.
cc
#
install
target
.
path
=
$$
[
QT_INSTALL_PLUGINS
]
/
designer
sources
.
files
=
$$
SOURCES
$$
HEADERS
*.
pro
sources
.
path
=
$$
[
QT_INSTALL_EXAMPLES
]
/
designer
/
worldtimeclockplugin
INSTALLS
+=
target
symbian
:
include
(
$$
QT_SOURCE_TREE
/
examples
/
symbianpkgrules
.
pri
)
src/comm/MAVLinkSimulationLink.cc
View file @
d5f5922c
...
@@ -375,9 +375,9 @@ void MAVLinkSimulationLink::mainloop()
...
@@ -375,9 +375,9 @@ void MAVLinkSimulationLink::mainloop()
// Move X Position
// Move X Position
x
=
8.0
*
sin
((
double
)
circleCounter
/
5
0.0
);
x
=
12.0
*
sin
(((
double
)
circleCounter
)
/
10
0.0
);
y
=
3.0
*
cos
((
double
)
circleCounter
/
4
0.0
);
y
=
5.0
*
cos
(((
double
)
circleCounter
)
/
10
0.0
);
z
=
1.8
+
1.2
*
sin
((
double
)
circleCounter
/
60.0
);
z
=
1.8
+
1.2
*
sin
((
(
double
)
circleCounter
)
/
60.0
);
circleCounter
++
;
circleCounter
++
;
...
@@ -413,7 +413,7 @@ void MAVLinkSimulationLink::mainloop()
...
@@ -413,7 +413,7 @@ void MAVLinkSimulationLink::mainloop()
// streampointer += bufferlength;
// streampointer += bufferlength;
// GLOBAL POSITION
// GLOBAL POSITION
mavlink_msg_global_position_pack
(
systemId
,
componentId
,
&
ret
,
0
,
47.378028137103
+
(
x
*
0.00
1
),
8.54899892510421
+
(
y
*
0.001
),
z
+
2
5.0
,
0
,
0
,
0
);
mavlink_msg_global_position_pack
(
systemId
,
componentId
,
&
ret
,
0
,
47.378028137103
+
(
x
*
0.00
2
),
8.54899892510421
+
(
y
*
0.002
),
z
+
3
5.0
,
0
,
0
,
0
);
bufferlength
=
mavlink_msg_to_send_buffer
(
buffer
,
&
ret
);
bufferlength
=
mavlink_msg_to_send_buffer
(
buffer
,
&
ret
);
//add data into datastream
//add data into datastream
memcpy
(
stream
+
streampointer
,
buffer
,
bufferlength
);
memcpy
(
stream
+
streampointer
,
buffer
,
bufferlength
);
...
...
src/ui/designer/QGCParamSlider.cc
0 → 100644
View file @
d5f5922c
#include "QGCParamSlider.h"
#include "ui_QGCParamSlider.h"
QGCParamSlider
::
QGCParamSlider
(
QWidget
*
parent
)
:
QWidget
(
parent
),
ui
(
new
Ui
::
QGCParamSlider
)
{
ui
->
setupUi
(
this
);
}
QGCParamSlider
::~
QGCParamSlider
()
{
delete
ui
;
}
void
QGCParamSlider
::
changeEvent
(
QEvent
*
e
)
{
QWidget
::
changeEvent
(
e
);
switch
(
e
->
type
())
{
case
QEvent
:
:
LanguageChange
:
ui
->
retranslateUi
(
this
);
break
;
default:
break
;
}
}
src/ui/designer/QGCParamSlider.h
0 → 100644
View file @
d5f5922c
#ifndef QGCPARAMSLIDER_H
#define QGCPARAMSLIDER_H
#include <QWidget>
#include <QtDesigner/QDesignerExportWidget>
namespace
Ui
{
class
QGCParamSlider
;
}
class
QDESIGNER_WIDGET_EXPORT
QGCParamSlider
:
public
QWidget
{
Q_OBJECT
public:
explicit
QGCParamSlider
(
QWidget
*
parent
=
0
);
~
QGCParamSlider
();
protected:
void
changeEvent
(
QEvent
*
e
);
private:
Ui
::
QGCParamSlider
*
ui
;
};
#endif // QGCPARAMSLIDER_H
src/ui/designer/QGCParamSlider.ui
0 → 100644
View file @
d5f5922c
<?xml version="1.0" encoding="UTF-8"?>
<ui
version=
"4.0"
>
<class>
QGCParamSlider
</class>
<widget
class=
"QWidget"
name=
"QGCParamSlider"
>
<property
name=
"geometry"
>
<rect>
<x>
0
</x>
<y>
0
</y>
<width>
400
</width>
<height>
22
</height>
</rect>
</property>
<property
name=
"windowTitle"
>
<string>
Form
</string>
</property>
<layout
class=
"QHBoxLayout"
name=
"horizontalLayout"
>
<property
name=
"spacing"
>
<number>
8
</number>
</property>
<property
name=
"margin"
>
<number>
0
</number>
</property>
<item>
<widget
class=
"QLabel"
name=
"nameLabel"
>
<property
name=
"text"
>
<string>
Name
</string>
</property>
</widget>
</item>
<item>
<widget
class=
"QLabel"
name=
"valueLabel"
>
<property
name=
"text"
>
<string>
0.00
</string>
</property>
</widget>
</item>
<item>
<widget
class=
"QSlider"
name=
"valueSlider"
>
<property
name=
"orientation"
>
<enum>
Qt::Horizontal
</enum>
</property>
</widget>
</item>
</layout>
</widget>
<resources/>
<connections/>
</ui>
src/ui/designer/QGCParamSliderPlugin.cc
0 → 100644
View file @
d5f5922c
#include "QGCParamSliderPlugin.h"
#include "QGCParamSlider.h"
#include <QtPlugin>
QGCParamSliderPlugin
::
QGCParamSliderPlugin
(
QObject
*
parent
)
:
QObject
(
parent
)
{
initialized
=
false
;
}
void
QGCParamSliderPlugin
::
initialize
(
QDesignerFormEditorInterface
*
/* core */
)
{
if
(
initialized
)
return
;
initialized
=
true
;
}
bool
QGCParamSliderPlugin
::
isInitialized
()
const
{
return
initialized
;
}
QWidget
*
QGCParamSliderPlugin
::
createWidget
(
QWidget
*
parent
)
{
return
new
QGCParamSlider
(
parent
);
}
QString
QGCParamSliderPlugin
::
name
()
const
{
return
"QGCParamSlider"
;
}
QString
QGCParamSliderPlugin
::
group
()
const
{
return
"QGroundControl"
;
}
QIcon
QGCParamSliderPlugin
::
icon
()
const
{
return
QIcon
();
}
QString
QGCParamSliderPlugin
::
toolTip
()
const
{
return
""
;
}
QString
QGCParamSliderPlugin
::
whatsThis
()
const
{
return
""
;
}
bool
QGCParamSliderPlugin
::
isContainer
()
const
{
return
false
;
}
QString
QGCParamSliderPlugin
::
domXml
()
const
{
return
"<ui language=
\"
c++
\"
>
\n
"
" <widget class=
\"
QGCParamSlider
\"
name=
\"
paramSlider
\"
>
\n
"
" <property name=
\"
geometry
\"
>
\n
"
" <rect>
\n
"
" <x>0</x>
\n
"
" <y>0</y>
\n
"
" <width>150</width>
\n
"
" <height>16</height>
\n
"
" </rect>
\n
"
" </property>
\n
"
" </widget>
\n
"
"</ui>"
;
}
QString
QGCParamSliderPlugin
::
includeFile
()
const
{
return
"QGCParamSlider.h"
;
}
Q_EXPORT_PLUGIN2
(
qgcparamsliderplugin
,
QGCParamSliderPlugin
)
src/ui/designer/QGCParamSliderPlugin.h
0 → 100644
View file @
d5f5922c
#ifndef QGCPARAMSLIDERPLUGIN_H
#define QGCPARAMSLIDERPLUGIN_H
#include <QtDesigner/QDesignerCustomWidgetInterface>
class
QGCParamSliderPlugin
:
public
QObject
,
public
QDesignerCustomWidgetInterface
{
Q_OBJECT
Q_INTERFACES
(
QDesignerCustomWidgetInterface
)
public:
explicit
QGCParamSliderPlugin
(
QObject
*
parent
=
0
);
bool
isContainer
()
const
;
bool
isInitialized
()
const
;
QIcon
icon
()
const
;
QString
domXml
()
const
;
QString
group
()
const
;
QString
includeFile
()
const
;
QString
name
()
const
;
QString
toolTip
()
const
;
QString
whatsThis
()
const
;
QWidget
*
createWidget
(
QWidget
*
parent
);
void
initialize
(
QDesignerFormEditorInterface
*
core
);
private:
bool
initialized
;
};
#endif // QGCPARAMSLIDERPLUGIN_H
src/ui/map/MAV2DIcon.cc
View file @
d5f5922c
...
@@ -47,7 +47,7 @@ void MAV2DIcon::drawIcon(QPen* pen)
...
@@ -47,7 +47,7 @@ void MAV2DIcon::drawIcon(QPen* pen)
if
(
pen
)
if
(
pen
)
{
{
mypixmap
=
new
QPixmap
(
radius
+
1
,
radius
+
1
);
mypixmap
=
new
QPixmap
(
radius
+
1
,
radius
+
1
);
mypixmap
->
fill
(
Qt
::
transparent
);
//
mypixmap->fill(Qt::transparent);
QPainter
painter
(
mypixmap
);
QPainter
painter
(
mypixmap
);
// DRAW MICRO AIR VEHICLE
// DRAW MICRO AIR VEHICLE
...
...
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