From 9af0bb6c392062873610dd500e1e4e427d2c89ca Mon Sep 17 00:00:00 2001 From: tecnosapiens Date: Mon, 13 Dec 2010 08:18:47 -0600 Subject: [PATCH 1/4] clean code --- src/ui/SlugsPadCameraControl.cpp | 31 +++++++++++-------------------- 1 file changed, 11 insertions(+), 20 deletions(-) diff --git a/src/ui/SlugsPadCameraControl.cpp b/src/ui/SlugsPadCameraControl.cpp index 3e198c6..e83019e 100644 --- a/src/ui/SlugsPadCameraControl.cpp +++ b/src/ui/SlugsPadCameraControl.cpp @@ -29,13 +29,9 @@ void SlugsPadCameraControl::mouseMoveEvent(QMouseEvent *event) //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(); - } + // getDeltaPositionPad(event->x(), event->y()); + } @@ -54,7 +50,7 @@ void SlugsPadCameraControl::mouseReleaseEvent(QMouseEvent *event) { dragging = false; //emit mouseReleaseCoord(event->x(),event->y()); - //getDeltaPositionPad(event->x(), event->y()); + getDeltaPositionPad(event->x(), event->y()); xFin = event->x(); yFin = event->y(); @@ -105,6 +101,10 @@ void SlugsPadCameraControl::getDeltaPositionPad(int x2, int y2) double bearing = localMeasures.x(); double dist = getDistPixel(y1,x1,y2,x2); + // this only convert real bearing to frame widget bearing + bearing = bearing +90; + if(bearing>= 360) bearing = bearing - 360; + if(((bearing > 330)&&(bearing < 360)) || ((bearing >= 0)&&(bearing <= 30))) @@ -210,16 +210,9 @@ double SlugsPadCameraControl::getDistPixel(int x1, int y1, int x2, int y2) // distancia = (float) hipotenusa; } -/** - * Esta función xxxxxxxxx - * @param double lat1 --> - * @param double lon1 --> - * @param double lat2 --> - * @param double lon2 --> - * @param ref double rumbo --> - * @param ref double distancia --> - */ -QPointF SlugsPadCameraControl::ObtenerMarcacionDistanciaPixel(double lon1, double lat1, double lon2, double lat2) + +QPointF SlugsPadCameraControl::ObtenerMarcacionDistanciaPixel(double lon1, double lat1, + double lon2, double lat2) { double cateto_opuesto,cateto_adyacente, hipotenusa, distancia, marcacion; @@ -256,9 +249,7 @@ QPointF SlugsPadCameraControl::ObtenerMarcacionDistanciaPixel(double lon1, doubl else if((lat1 == lat2) && (lon1 == lon2)) //0 marcacion = 0.0; - // this only convert real bearing to frame widget bearing - marcacion = marcacion +90; - if(marcacion>= 360) marcacion = marcacion - 360; + return QPointF(marcacion,distancia); From c2b2b3c078c219cdeb6d0fcac3128bf4d5abbc7c Mon Sep 17 00:00:00 2001 From: tecnosapiens Date: Mon, 13 Dec 2010 17:38:38 -0600 Subject: [PATCH 2/4] change slugs camera control --- src/uas/SlugsMAV.cc | 6 +- src/ui/SlugsDataSensorView.cc | 4 +- src/ui/SlugsDataSensorView.ui | 3032 +++++++++++++++++++------------------- src/ui/SlugsPadCameraControl.cpp | 1 + src/ui/SlugsPadCameraControl.h | 4 + src/ui/SlugsVideoCamControl.ui | 26 +- 6 files changed, 1531 insertions(+), 1542 deletions(-) diff --git a/src/uas/SlugsMAV.cc b/src/uas/SlugsMAV.cc index edc2a4d..c53e6a0 100644 --- a/src/uas/SlugsMAV.cc +++ b/src/uas/SlugsMAV.cc @@ -137,7 +137,7 @@ void SlugsMAV::receiveMessage(LinkInterface* link, mavlink_message_t message) case MAVLINK_MSG_ID_PID: //182 memset(&mlSinglePid,0,sizeof(mavlink_pid_t)); mavlink_msg_pid_decode(&message, &mlSinglePid); - qDebug() << "\nSLUGS RECEIVED PID Message = "<m_GpsLongitude->setText(QString::number(lon)); ui->m_GpsHeight->setText(QString::number(alt)); - qDebug()<<"GPS Position = "<m_Pitch->setPlainText(QString::number(slugpitch)); ui->m_Yaw->setPlainText(QString::number(slugyaw)); - qDebug()<<"Attitude change = "<0 0 399 - 604 + 598 @@ -31,18 +31,18 @@ Form - + - 1 + 0 Tab 1 - - + + @@ -2904,1003 +2904,995 @@ Tab 3 - - - - - - - - 0 - 0 - - - - - 132123 - 123123 - - - - CPU Load - - - - - - - - - 0 - 0 - - - - - 16777215 - 16777215 - - - - - 10 - 75 - true - - - - Sensor - - - - - - - - 60 - 18 - - - - - 80 - 18 - - - - - 10 - - - - QFrame::WinPanel - - - Qt::ScrollBarAlwaysOff - - - Qt::ScrollBarAlwaysOff - - - true - - - - - - - - 0 - 0 - - - - - 16777215 - 16777215 - - - - - 10 - 75 - true - - - - Control - - - - - - - - 60 - 18 - - - - - 80 - 18 - - - - - 10 - - - - QFrame::WinPanel - - - Qt::ScrollBarAlwaysOff - - - Qt::ScrollBarAlwaysOff - - - true - - - - - - - - 0 - 0 - - - - - 16777215 - 16777215 - - - - - 10 - 75 - true - - - - Batt Volt - - - - - - - - 60 - 18 - - - - - 80 - 18 - - - - - 10 - - - - QFrame::WinPanel - - - Qt::ScrollBarAlwaysOff - - - Qt::ScrollBarAlwaysOff - - - true - - - - + + + + + + 0 + 0 + + + + + 132123 + 123123 + + + + CPU Load + + + + + + + + + 0 + 0 + + + + + 16777215 + 16777215 + + + + + 10 + 75 + true + + + + Sensor + + - - - - - - - - 0 - 0 - - - - - 132123 - 123123 - - - - Air Data - - - - - - - - - 0 - 0 - - - - - 16777215 - 16777215 - - - - - 10 - 75 - true - - - - Dynamic - - - - - - - - 60 - 18 - - - - - 80 - 18 - - - - - 10 - - - - QFrame::WinPanel - - - Qt::ScrollBarAlwaysOff - - - Qt::ScrollBarAlwaysOff - - - true - - - - - - - - 0 - 0 - - - - - 16777215 - 16777215 - - - - - 10 - 75 - true - - - - Static - - - - - - - - 60 - 18 - - - - - 80 - 18 - - - - - 10 - - - - QFrame::WinPanel - - - Qt::ScrollBarAlwaysOff - - - Qt::ScrollBarAlwaysOff - - - true - - - - - - - - 0 - 0 - - - - - 16777215 - 16777215 - - - - - 10 - 75 - true - - - - Temperature - - - - - - - - 60 - 18 - - - - - 80 - 18 - - - - - 10 - - - - QFrame::WinPanel - - - Qt::ScrollBarAlwaysOff - - - Qt::ScrollBarAlwaysOff - - - true - - - - + + + + + 60 + 18 + + + + + 80 + 18 + + + + + 10 + + + + QFrame::WinPanel + + + Qt::ScrollBarAlwaysOff + + + Qt::ScrollBarAlwaysOff + + + true + + + + + + + + 0 + 0 + + + + + 16777215 + 16777215 + + + + + 10 + 75 + true + + + + Control + + + + + + + + 60 + 18 + + + + + 80 + 18 + + + + + 10 + + + + QFrame::WinPanel + + + Qt::ScrollBarAlwaysOff + + + Qt::ScrollBarAlwaysOff + + + true + + + + + + + + 0 + 0 + + + + + 16777215 + 16777215 + + + + + 10 + 75 + true + + + + Batt Volt + + + + + + + + 60 + 18 + + + + + 80 + 18 + + + + + 10 + + + + QFrame::WinPanel + + + Qt::ScrollBarAlwaysOff + + + Qt::ScrollBarAlwaysOff + + + true + + - - - + + + - - + + - 311 - 213 + 0 + 0 - 371 - 213 + 132123 + 123123 - Filtered Data + Air Data - - - + + + - - - - - - 0 - 0 - - - - - 16777215 - 16777215 - - - - - 10 - 75 - true - - - - Ax - - - - - - - - 60 - 18 - - - - - 80 - 18 - - - - - 10 - - - - QFrame::WinPanel - - - Qt::ScrollBarAlwaysOff - - - Qt::ScrollBarAlwaysOff - - - true - - - - - - - - 0 - 0 - - - - - 16777215 - 16777215 - - - - - 10 - 75 - true - - - - Ay - - - - - - - - 0 - 0 - - - - - 60 - 18 - - - - - 80 - 18 - - - - - 10 - - - - QFrame::WinPanel - - - Qt::ScrollBarAlwaysOff - - - Qt::ScrollBarAlwaysOff - - - true - - - - - - - - 0 - 0 - - - - - 16777215 - 16777215 - - - - - 10 - 75 - true - - - - Az - - - - - - - - 60 - 18 - - - - - 80 - 18 - - - - - 10 - - - - QFrame::WinPanel - - - Qt::ScrollBarAlwaysOff - - - Qt::ScrollBarAlwaysOff - - - true - - - - + + + + 0 + 0 + + + + + 16777215 + 16777215 + + + + + 10 + 75 + true + + + + Dynamic + + - - - - - - - 0 - 0 - - - - - 16777215 - 16777215 - - - - - 10 - 75 - true - - - - Gx - - - - - - - - 60 - 18 - - - - - 80 - 18 - - - - - 10 - - - - QFrame::WinPanel - - - Qt::ScrollBarAlwaysOff - - - Qt::ScrollBarAlwaysOff - - - true - - - - - - - - 0 - 0 - - - - - 16777215 - 16777215 - - - - - 10 - 75 - true - - - - Gy - - - - - - - - 60 - 18 - - - - - 80 - 18 - - - - - 10 - - - - QFrame::WinPanel - - - Qt::ScrollBarAlwaysOff - - - Qt::ScrollBarAlwaysOff - - - true - - - - - - - - 0 - 0 - - - - - 16777215 - 16777215 - - - - - 10 - 75 - true - - - - Gz - - - - - - - - 60 - 18 - - - - - 80 - 18 - - - - - 10 - - - - QFrame::WinPanel - - - Qt::ScrollBarAlwaysOff - - - Qt::ScrollBarAlwaysOff - - - true - - - - + + + + + 60 + 18 + + + + + 80 + 18 + + + + + 10 + + + + QFrame::WinPanel + + + Qt::ScrollBarAlwaysOff + + + Qt::ScrollBarAlwaysOff + + + true + + + + + + + + 0 + 0 + + + + + 16777215 + 16777215 + + + + + 10 + 75 + true + + + + Static + + + + + + + + 60 + 18 + + + + + 80 + 18 + + + + + 10 + + + + QFrame::WinPanel + + + Qt::ScrollBarAlwaysOff + + + Qt::ScrollBarAlwaysOff + + + true + + + + + + + + 0 + 0 + + + + + 16777215 + 16777215 + + + + + 10 + 75 + true + + + + Temperature + + + + + + + + 60 + 18 + + + + + 80 + 18 + + + + + 10 + + + + QFrame::WinPanel + + + Qt::ScrollBarAlwaysOff + + + Qt::ScrollBarAlwaysOff + + + true + + + + + + + + + + + + + 311 + 213 + + + + + 371 + 213 + + + + Filtered Data + + + + + + + + + 0 + 0 + + + + + 16777215 + 16777215 + + + + + 10 + 75 + true + + + + Ax + + + + + + + + 60 + 18 + + + + + 80 + 18 + + + + + 10 + + + + QFrame::WinPanel + + + Qt::ScrollBarAlwaysOff + + + Qt::ScrollBarAlwaysOff + + + true + + + + + + + + 0 + 0 + + + + + 16777215 + 16777215 + + + + + 10 + 75 + true + + + + Ay + + + + + + + + 0 + 0 + + + + + 60 + 18 + + + + + 80 + 18 + + + + + 10 + + + + QFrame::WinPanel + + + Qt::ScrollBarAlwaysOff + + + Qt::ScrollBarAlwaysOff + + + true + + - - - - - - - 0 - 0 - - - - - 16777215 - 16777215 - - - - - 10 - 75 - true - - - - Mx - - - - - - - - 60 - 18 - - - - - 80 - 18 - - - - - 10 - - - - QFrame::WinPanel - - - Qt::ScrollBarAlwaysOff - - - Qt::ScrollBarAlwaysOff - - - true - - - - - - - - 0 - 0 - - - - - 16777215 - 16777215 - - - - - 10 - 75 - true - - - - My - - - - - - - - 60 - 18 - - - - - 80 - 18 - - - - - 10 - - - - QFrame::WinPanel - - - Qt::ScrollBarAlwaysOff - - - Qt::ScrollBarAlwaysOff - - - true - - - - - - - - 0 - 0 - - - - - 16777215 - 16777215 - - - - - 10 - 75 - true - - - - Mz - - - - - - - - 60 - 18 - - - - - 80 - 18 - - - - - 10 - - - - QFrame::WinPanel - - - Qt::ScrollBarAlwaysOff - - - Qt::ScrollBarAlwaysOff - - - true - - - - + + + + + 0 + 0 + + + + + 16777215 + 16777215 + + + + + 10 + 75 + true + + + + Az + + + + + + + + 60 + 18 + + + + + 80 + 18 + + + + + 10 + + + + QFrame::WinPanel + + + Qt::ScrollBarAlwaysOff + + + Qt::ScrollBarAlwaysOff + + + true + + + + + + + + + + + + 0 + 0 + + + + + 16777215 + 16777215 + + + + + 10 + 75 + true + + + + Gx + + + + + + + + 60 + 18 + + + + + 80 + 18 + + + + + 10 + + + + QFrame::WinPanel + + + Qt::ScrollBarAlwaysOff + + + Qt::ScrollBarAlwaysOff + + + true + + + + + + + + 0 + 0 + + + + + 16777215 + 16777215 + + + + + 10 + 75 + true + + + + Gy + + + + + + + + 60 + 18 + + + + + 80 + 18 + + + + + 10 + + + + QFrame::WinPanel + + + Qt::ScrollBarAlwaysOff + + + Qt::ScrollBarAlwaysOff + + + true + + + + + + + + 0 + 0 + + + + + 16777215 + 16777215 + + + + + 10 + 75 + true + + + + Gz + + + + + + + + 60 + 18 + + + + + 80 + 18 + + + + + 10 + + + + QFrame::WinPanel + + + Qt::ScrollBarAlwaysOff + + + Qt::ScrollBarAlwaysOff + + + true + + + + + + + + + + + + 0 + 0 + + + + + 16777215 + 16777215 + + + + + 10 + 75 + true + + + + Mx + + + + + + + + 60 + 18 + + + + + 80 + 18 + + + + + 10 + + + + QFrame::WinPanel + + + Qt::ScrollBarAlwaysOff + + + Qt::ScrollBarAlwaysOff + + + true + + + + + + + + 0 + 0 + + + + + 16777215 + 16777215 + + + + + 10 + 75 + true + + + + My + + + + + + + + 60 + 18 + + + + + 80 + 18 + + + + + 10 + + + + QFrame::WinPanel + + + Qt::ScrollBarAlwaysOff + + + Qt::ScrollBarAlwaysOff + + + true + + + + + + + + 0 + 0 + + + + + 16777215 + 16777215 + + + + + 10 + 75 + true + + + + Mz + + - - - Qt::Vertical + + + + 60 + 18 + - + - 20 - 40 + 80 + 18 - + + + 10 + + + + QFrame::WinPanel + + + Qt::ScrollBarAlwaysOff + + + Qt::ScrollBarAlwaysOff + + + true + + + + + + Qt::Vertical + + + + 20 + 84 + + + + - + @@ -3917,567 +3909,563 @@ Raw Data - - - + + + - - - - - - 0 - 0 - - - - - 16777215 - 16777215 - - - - - 10 - 75 - true - - - - Ax - - - - - - - - 60 - 18 - - - - - 80 - 18 - - - - - 10 - - - - QFrame::WinPanel - - - Qt::ScrollBarAlwaysOff - - - Qt::ScrollBarAlwaysOff - - - true - - - - - - - - 0 - 0 - - - - - 16777215 - 16777215 - - - - - 10 - 75 - true - - - - Ay - - - - - - - - 60 - 18 - - - - - 80 - 18 - - - - - 10 - - - - QFrame::WinPanel - - - Qt::ScrollBarAlwaysOff - - - Qt::ScrollBarAlwaysOff - - - true - - - - - - - - 0 - 0 - - - - - 16777215 - 16777215 - - - - - 10 - 75 - true - - - - Az - - - - - - - - 60 - 18 - - - - - 80 - 18 - - - - - 10 - - - - QFrame::WinPanel - - - Qt::ScrollBarAlwaysOff - - - Qt::ScrollBarAlwaysOff - - - true - - - - + + + + 0 + 0 + + + + + 16777215 + 16777215 + + + + + 10 + 75 + true + + + + Ax + + + + + + + + 60 + 18 + + + + + 80 + 18 + + + + + 10 + + + + QFrame::WinPanel + + + Qt::ScrollBarAlwaysOff + + + Qt::ScrollBarAlwaysOff + + + true + + - - - - - - - 0 - 0 - - - - - 16777215 - 16777215 - - - - - 10 - 75 - true - - - - Gx - - - - - - - - 60 - 18 - - - - - 80 - 18 - - - - - 10 - - - - QFrame::WinPanel - - - Qt::ScrollBarAlwaysOff - - - Qt::ScrollBarAlwaysOff - - - true - - - - - - - - 0 - 0 - - - - - 16777215 - 16777215 - - - - - 10 - 75 - true - - - - Gy - - - - - - - - 60 - 18 - - - - - 80 - 18 - - - - - 10 - - - - QFrame::WinPanel - - - Qt::ScrollBarAlwaysOff - - - Qt::ScrollBarAlwaysOff - - - true - - - - - - - - 0 - 0 - - - - - 16777215 - 16777215 - - - - - 10 - 75 - true - - - - Gz - - - - - - - - 60 - 18 - - - - - 80 - 18 - - - - - 10 - - - - QFrame::WinPanel - - - Qt::ScrollBarAlwaysOff - - - Qt::ScrollBarAlwaysOff - - - true - - - - + + + + + 0 + 0 + + + + + 16777215 + 16777215 + + + + + 10 + 75 + true + + + + Ay + + + + + + + + 60 + 18 + + + + + 80 + 18 + + + + + 10 + + + + QFrame::WinPanel + + + Qt::ScrollBarAlwaysOff + + + Qt::ScrollBarAlwaysOff + + + true + + + + + + + + 0 + 0 + + + + + 16777215 + 16777215 + + + + + 10 + 75 + true + + + + Az + + + + + + + + 60 + 18 + + + + + 80 + 18 + + + + + 10 + + + + QFrame::WinPanel + + + Qt::ScrollBarAlwaysOff + + + Qt::ScrollBarAlwaysOff + + + true + + + + + + + + + + + + 0 + 0 + + + + + 16777215 + 16777215 + + + + + 10 + 75 + true + + + + Gx + + + + + + + + 60 + 18 + + + + + 80 + 18 + + + + + 10 + + + + QFrame::WinPanel + + + Qt::ScrollBarAlwaysOff + + + Qt::ScrollBarAlwaysOff + + + true + + + + + + + + 0 + 0 + + + + + 16777215 + 16777215 + + + + + 10 + 75 + true + + + + Gy + + + + + + + + 60 + 18 + + + + + 80 + 18 + + + + + 10 + + + + QFrame::WinPanel + + + Qt::ScrollBarAlwaysOff + + + Qt::ScrollBarAlwaysOff + + + true + + - - - - - - - 0 - 0 - - - - - 16777215 - 16777215 - - - - - 10 - 75 - true - - - - Mx - - - - - - - - 60 - 18 - - - - - 80 - 18 - - - - - 10 - - - - QFrame::WinPanel - - - Qt::ScrollBarAlwaysOff - - - Qt::ScrollBarAlwaysOff - - - true - - - - - - - - 0 - 0 - - - - - 16777215 - 16777215 - - - - - 10 - 75 - true - - - - My - - - - - - - - 60 - 18 - - - - - 80 - 18 - - - - - 10 - - - - QFrame::WinPanel - - - Qt::ScrollBarAlwaysOff - - - Qt::ScrollBarAlwaysOff - - - true - - - - - - - - 0 - 0 - - - - - 16777215 - 16777215 - - - - - 10 - 75 - true - - - - Mz - - - - - - - - 60 - 18 - - - - - 80 - 18 - - - - - 10 - - - - QFrame::WinPanel - - - Qt::ScrollBarAlwaysOff - - - Qt::ScrollBarAlwaysOff - - - true - - - - + + + + + 0 + 0 + + + + + 16777215 + 16777215 + + + + + 10 + 75 + true + + + + Gz + + + + + + + + 60 + 18 + + + + + 80 + 18 + + + + + 10 + + + + QFrame::WinPanel + + + Qt::ScrollBarAlwaysOff + + + Qt::ScrollBarAlwaysOff + + + true + + + + + + + + + + + + 0 + 0 + + + + + 16777215 + 16777215 + + + + + 10 + 75 + true + + + + Mx + + + + + + + + 60 + 18 + + + + + 80 + 18 + + + + + 10 + + + + QFrame::WinPanel + + + Qt::ScrollBarAlwaysOff + + + Qt::ScrollBarAlwaysOff + + + true + + + + + + + + 0 + 0 + + + + + 16777215 + 16777215 + + + + + 10 + 75 + true + + + + My + + + + + + + + 60 + 18 + + + + + 80 + 18 + + + + + 10 + + + + QFrame::WinPanel + + + Qt::ScrollBarAlwaysOff + + + Qt::ScrollBarAlwaysOff + + + true + + + + + + + + 0 + 0 + + + + + 16777215 + 16777215 + + + + + 10 + 75 + true + + + + Mz + + - - - Qt::Vertical + + + + 60 + 18 + - + - 20 - 40 + 80 + 18 - + + + 10 + + + + QFrame::WinPanel + + + Qt::ScrollBarAlwaysOff + + + Qt::ScrollBarAlwaysOff + + + true + + + + + + Qt::Vertical + + + + 20 + 84 + + + + diff --git a/src/ui/SlugsPadCameraControl.cpp b/src/ui/SlugsPadCameraControl.cpp index e83019e..745056d 100644 --- a/src/ui/SlugsPadCameraControl.cpp +++ b/src/ui/SlugsPadCameraControl.cpp @@ -27,6 +27,7 @@ SlugsPadCameraControl::~SlugsPadCameraControl() void SlugsPadCameraControl::mouseMoveEvent(QMouseEvent *event) { //emit mouseMoveCoord(event->x(),event->y()); + if(dragging) { diff --git a/src/ui/SlugsPadCameraControl.h b/src/ui/SlugsPadCameraControl.h index bb35976..dbf5550 100644 --- a/src/ui/SlugsPadCameraControl.h +++ b/src/ui/SlugsPadCameraControl.h @@ -19,12 +19,16 @@ public: public slots: void getDeltaPositionPad(int x, int y); + + + double getDistPixel(int x1, int y1, int x2, int y2); QPointF ObtenerMarcacionDistanciaPixel(double lon1, double lat1, double lon2, double lat2); QPointF getPointBy_BearingDistance(double lat1, double lon1, double rumbo, double distancia); + signals: void mouseMoveCoord(int x, int y); void mousePressCoord(int x, int y); diff --git a/src/ui/SlugsVideoCamControl.ui b/src/ui/SlugsVideoCamControl.ui index c89c2e7..7bbe214 100644 --- a/src/ui/SlugsVideoCamControl.ui +++ b/src/ui/SlugsVideoCamControl.ui @@ -22,10 +22,10 @@ Form - - - - + + + + true @@ -35,7 +35,7 @@ - + true @@ -45,21 +45,17 @@ - - + + - Camera Pos + Camera at Map - - - - - - + + - Camera at Map + Camera Pos From d60b2661289c6f8360c26d6f8cb5e642096b36ef Mon Sep 17 00:00:00 2001 From: tecnosapiens Date: Tue, 14 Dec 2010 11:54:05 -0600 Subject: [PATCH 3/4] tracking read waypoint errors --- src/uas/UASWaypointManager.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/uas/UASWaypointManager.cc b/src/uas/UASWaypointManager.cc index d1761bd..f7e59bf 100644 --- a/src/uas/UASWaypointManager.cc +++ b/src/uas/UASWaypointManager.cc @@ -600,22 +600,26 @@ void UASWaypointManager::sendWaypointRequest(quint16 seq) void UASWaypointManager::sendWaypoint(quint16 seq) { mavlink_message_t message; + qDebug() <<" WP Buffer count: "<target_system = uas.getUASID(); wp->target_component = MAV_COMP_ID_WAYPOINTPLANNER; emit updateStatusString(QString("sending waypoint ID %1 of %2 total").arg(wp->seq).arg(current_count)); + qDebug() << "sent waypoint (" << wp->seq << ") to ID " << wp->target_system<<" WP Buffer count: "<getSystemId(), uas.mavlink->getComponentId(), &message, wp); uas.sendMessage(message); MG::SLEEP::usleep(PROTOCOL_DELAY_MS * 1000); - qDebug() << "sent waypoint (" << wp->seq << ") to ID " << wp->target_system; } } From 02c420a795d44fca3b5a9a36e86efa52be66c158 Mon Sep 17 00:00:00 2001 From: tecnosapiens Date: Wed, 15 Dec 2010 07:53:35 -0600 Subject: [PATCH 4/4] tracking read waypoint from autopilot bug --- src/uas/UASWaypointManager.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/src/uas/UASWaypointManager.cc b/src/uas/UASWaypointManager.cc index f7e59bf..09cd9bc 100644 --- a/src/uas/UASWaypointManager.cc +++ b/src/uas/UASWaypointManager.cc @@ -31,6 +31,7 @@ This file is part of the QGROUNDCONTROL project #include "UASWaypointManager.h" #include "UAS.h" +#include "mavlink_types.h" #define PROTOCOL_TIMEOUT_MS 2000 ///< maximum time to wait for pending messages until timeout #define PROTOCOL_DELAY_MS 40 ///< minimum delay between sent messages