Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Valentin Platzgummer
qgroundcontrol
Commits
6bd785b5
Commit
6bd785b5
authored
Dec 07, 2010
by
tecnosapiens
Browse files
connect signal for get all values pid from UAS
parent
754eaca9
Changes
4
Hide whitespace changes
Inline
Side-by-side
src/ui/SlugsPIDControl.cpp
View file @
6bd785b5
...
...
@@ -55,6 +55,7 @@ void SlugsPIDControl::activeUasSet(UASInterface* uas)
connect
(
slugsMav
,
SIGNAL
(
slugsPidValues
(
int
,
mavlink_pid_t
)),
this
,
SLOT
(
receivePidValues
(
int
,
mavlink_pid_t
))
);
connect
(
ui
->
setGeneral_pushButton
,
SIGNAL
(
clicked
()),
this
,
SLOT
(
slugsTimerStartSet
()));
connect
(
ui
->
getGeneral_pushButton
,
SIGNAL
(
clicked
()),
this
,
SLOT
(
slugsTimerStartGet
()));
}
#endif // MAVLINK_ENABLED_SLUG
...
...
src/ui/SlugsPadCameraControl.cpp
View file @
6bd785b5
...
...
@@ -23,13 +23,25 @@ SlugsPadCameraControl::~SlugsPadCameraControl()
void
SlugsPadCameraControl
::
mouseMoveEvent
(
QMouseEvent
*
event
)
{
emit
mouseMoveCoord
(
event
->
x
(),
event
->
y
());
//emit mouseMoveCoord(event->x(),event->y());
if
(
dragging
)
{
if
(
abs
(
x1
-
event
->
x
())
>
20
||
abs
(
y1
-
event
->
y
())
>
20
)
{
getDeltaPositionPad
(
event
->
x
(),
event
->
y
());
x1
=
event
->
x
();
y1
=
event
->
y
();
}
}
}
void
SlugsPadCameraControl
::
mousePressEvent
(
QMouseEvent
*
event
)
{
emit
mousePressCoord
(
event
->
x
(),
event
->
y
());
//emit mousePressCoord(event->x(),event->y());
dragging
=
true
;
x1
=
event
->
x
();
y1
=
event
->
y
();
...
...
@@ -37,8 +49,10 @@ void SlugsPadCameraControl::mousePressEvent(QMouseEvent *event)
void
SlugsPadCameraControl
::
mouseReleaseEvent
(
QMouseEvent
*
event
)
{
emit
mouseReleaseCoord
(
event
->
x
(),
event
->
y
());
getDeltaPositionPad
(
event
->
x
(),
event
->
y
());
dragging
=
false
;
//emit mouseReleaseCoord(event->x(),event->y());
//getDeltaPositionPad(event->x(), event->y());
}
...
...
@@ -92,7 +106,7 @@ void SlugsPadCameraControl::getDeltaPositionPad(int x2, int y2)
{
emit
dirCursorText
(
"right up"
);
//bearing = 315;
dir
=
"riht up"
;
dir
=
"ri
g
ht up"
;
}
else
{
...
...
@@ -100,7 +114,7 @@ void SlugsPadCameraControl::getDeltaPositionPad(int x2, int y2)
{
emit
dirCursorText
(
"right"
);
//bearing = 315;
dir
=
"riht"
;
dir
=
"ri
g
ht"
;
}
else
{
...
...
@@ -108,7 +122,7 @@ void SlugsPadCameraControl::getDeltaPositionPad(int x2, int y2)
{
emit
dirCursorText
(
"right down"
);
//bearing = 315;
dir
=
"riht down"
;
dir
=
"ri
g
ht down"
;
}
else
{
...
...
@@ -229,3 +243,5 @@ QPointF SlugsPadCameraControl::ObtenerMarcacionDistanciaPixel(double lon1, doubl
return
QPointF
(
marcacion
,
distancia
);
}
src/ui/SlugsPadCameraControl.h
View file @
6bd785b5
...
...
@@ -22,6 +22,7 @@ public slots:
double
getDistPixel
(
int
x1
,
int
y1
,
int
x2
,
int
y2
);
QPointF
ObtenerMarcacionDistanciaPixel
(
double
lon1
,
double
lat1
,
double
lon2
,
double
lat2
);
signals:
void
mouseMoveCoord
(
int
x
,
int
y
);
void
mousePressCoord
(
int
x
,
int
y
);
...
...
src/ui/WaypointList.cc
View file @
6bd785b5
...
...
@@ -346,11 +346,11 @@ void WaypointList::waypointListChanged()
WaypointGlobalView
*
wpgv
=
wpGlobalViews
.
value
(
wp
);
wpgv
->
updateValues
();
listLayout
->
addWidget
(
wpgv
);
if
(
loadFileGlobalWP
||
readGlobalWP
)
{
//
if(loadFileGlobalWP || readGlobalWP)
//
{
emit
createWaypointAtMap
(
QPointF
(
wp
->
getX
(),
wp
->
getY
()));
qDebug
()
<<
"Emitiendo Pos: "
<<
wp
->
getX
()
<<
" - "
<<
wp
->
getY
();
}
//
}
}
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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