Commit 6bd785b5 authored by tecnosapiens's avatar tecnosapiens

connect signal for get all values pid from UAS

parent 754eaca9
......@@ -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
......
......@@ -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 = "right up";
}
else
{
......@@ -100,7 +114,7 @@ void SlugsPadCameraControl::getDeltaPositionPad(int x2, int y2)
{
emit dirCursorText("right");
//bearing = 315;
dir = "riht";
dir = "right";
}
else
{
......@@ -108,7 +122,7 @@ void SlugsPadCameraControl::getDeltaPositionPad(int x2, int y2)
{
emit dirCursorText("right down");
//bearing = 315;
dir = "riht down";
dir = "right down";
}
else
{
......@@ -229,3 +243,5 @@ QPointF SlugsPadCameraControl::ObtenerMarcacionDistanciaPixel(double lon1, doubl
return QPointF(marcacion,distancia);
}
......@@ -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);
......
......@@ -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();
}
// }
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment