Commit 7692f653 authored by tecnosapiens's avatar tecnosapiens

working on Slugs layout

parent 0588e56f
......@@ -167,6 +167,7 @@ void SlugsMAV::receiveMessage(LinkInterface* link, mavlink_message_t message)
break;
}
#endif
default:
......
......@@ -2,6 +2,7 @@
#include "ui_SlugsDataSensorView.h"
#include <UASManager.h>
#include "SlugsMAV.h"
SlugsDataSensorView::SlugsDataSensorView(QWidget *parent) :
QWidget(parent),
......@@ -62,12 +63,16 @@ SlugsDataSensorView::~SlugsDataSensorView()
void SlugsDataSensorView::addUAS(UASInterface* uas)
{
if (uas != NULL)
SlugsMAV* slugsMav = dynamic_cast<SlugsMAV*>(uas);
if (slugsMav != NULL)
{
connect(uas, SIGNAL(localPositionChanged(UASInterface*,double,double,double,quint64)), this, SLOT(slugLocalPositionChange(UASInterface*,double,double,double,quint64)));
connect(uas, SIGNAL(speedChanged(UASInterface*,double,double,double,quint64)), this, SLOT(slugSpeedLocalPositionChanged(UASInterface*,double,double,double,quint64)));
connect(uas, SIGNAL(attitudeChanged(UASInterface*,double,double,double,quint64)), this, SLOT(slugAttitudeChanged(UASInterface*,double,double,double,quint64)));
connect(uas, SIGNAL(slugsSensorBias(UASInterface*,double,double,double,double,double,double,quint64)), this, SLOT(slugsSensorBiasAcelerometerChanged(UASInterface*,double,double,double,quint64)));
connect(slugsMav, SIGNAL(localPositionChanged(UASInterface*,double,double,double,quint64)), this, SLOT(slugLocalPositionChange(UASInterface*,double,double,double,quint64)));
connect(slugsMav, SIGNAL(speedChanged(UASInterface*,double,double,double,quint64)), this, SLOT(slugSpeedLocalPositionChanged(UASInterface*,double,double,double,quint64)));
connect(slugsMav, SIGNAL(attitudeChanged(UASInterface*,double,double,double,quint64)), this, SLOT(slugAttitudeChanged(UASInterface*,double,double,double,quint64)));
connect(slugsMav, SIGNAL(slugsSensorBias(UASInterface*,double,double,double,double,double,double,quint64)), this, SLOT(slugsSensorBiasAcelerometerChanged(UASInterface*,double,double,double,quint64)));
// connect(slugsMav, SIGNAL(slugsDiagnostic(UASInterface*,double,double,double,int16_t,int16_t,int16_t,quint64)),
// this, SLOT());
// Set this UAS as active if it is the first one
if(activeUAS == 0)
......@@ -115,6 +120,8 @@ void SlugsDataSensorView::refresh()
}
}
......
......@@ -35,6 +35,7 @@ This file is part of the QGROUNDCONTROL project
#include <QWidget>
#include "UASInterface.h"
#include "SlugsMAV.h"
namespace Ui {
class SlugsDataSensorView;
......@@ -77,25 +78,41 @@ public slots:
/**
* @brief Adds the UAS for data display
*
* Adds the UAS and makes all the correct connections for data display on the Widgets
*/
void slugLocalPositionChanged(UASInterface* uasTemp,
double x,
double y,
double z,
quint64 time);
/**
* @brief Adds the UAS for data display
*
* Adds the UAS and makes all the correct connections for data display on the Widgets
*/
void slugSpeedLocalPositionChanged(UASInterface* uasTemp,
double vx,
double vy,
double vz,
quint64 time);
/**
* @brief Adds the UAS for data display
*
* Adds the UAS and makes all the correct connections for data display on the Widgets
*/
void slugAttitudeChanged(UASInterface* uasTemp,
double slugroll,
double slugpitch,
double slugyaw,
quint64 time);
/**
* @brief Adds the UAS for data display
*
* Adds the UAS and makes all the correct connections for data display on the Widgets
*/
void slugsSensorBiasChanged(UASInterface* uasTemp,
double axb,
double ayb,
......@@ -104,6 +121,19 @@ public slots:
double gyb,
double gzb,
quint64 time);
/**
* @brief Adds the UAS for data display
*
* Adds the UAS and makes all the correct connections for data display on the Widgets
*/
void slugsDiagnosticMessageChanged(UASInterface* uasTemp,
double diagfl1,
double diagfl2,
double diagfl3,
int16_t diagsh1,
int16_t diagsh2,
int16_t diagsh3,
quint64 time);
protected:
QTimer* updateTimer;
......@@ -138,7 +168,14 @@ protected:
double Gzb;
quint64 TimeActualBias;
//
//Diagnostic
double diagFl1;
double diagFl2;
double diagFl3;
int16_t diagSh1;
int16_t diagSh2;
int16_t diagSh3;
quint64 timeDiagnostic;
......
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