Commit 6c1883b8 authored by Mariano Lizarraga's avatar Mariano Lizarraga
parents b2410648 6a5655eb
...@@ -32,6 +32,7 @@ ...@@ -32,6 +32,7 @@
# include ( "../qmapcontrol/QMapControl/QMapControl.pri" ) #{ # include ( "../qmapcontrol/QMapControl/QMapControl.pri" ) #{
# Include bundled version if necessary # Include bundled version if necessary
include(lib/QMapControl/QMapControl.pri) include(lib/QMapControl/QMapControl.pri)
# message("Including bundled QMapControl version as FALLBACK. This is fine on Linux and MacOS, but not the best choice in Windows") # message("Including bundled QMapControl version as FALLBACK. This is fine on Linux and MacOS, but not the best choice in Windows")
......
...@@ -42,11 +42,11 @@ void SlugsMAV::receiveMessage(LinkInterface* link, mavlink_message_t message) ...@@ -42,11 +42,11 @@ void SlugsMAV::receiveMessage(LinkInterface* link, mavlink_message_t message)
emit valueChanged(uasId, tr("ControlDSC Load"), cpu_load.ctrlLoad, time); emit valueChanged(uasId, tr("ControlDSC Load"), cpu_load.ctrlLoad, time);
emit valueChanged(uasId, tr("Battery Volt"), cpu_load.batVolt, time); emit valueChanged(uasId, tr("Battery Volt"), cpu_load.batVolt, time);
emit slugsCPULoad(uasId, // emit slugsCPULoad(uasId,
cpu_load.sensLoad, // cpu_load.sensLoad,
cpu_load.ctrlLoad, // cpu_load.ctrlLoad,
cpu_load.batVolt, // cpu_load.batVolt,
time); // 0);
break; break;
} }
...@@ -59,11 +59,11 @@ void SlugsMAV::receiveMessage(LinkInterface* link, mavlink_message_t message) ...@@ -59,11 +59,11 @@ void SlugsMAV::receiveMessage(LinkInterface* link, mavlink_message_t message)
emit valueChanged(uasId, tr("Static Pressure"),air_data.staticPressure, time); emit valueChanged(uasId, tr("Static Pressure"),air_data.staticPressure, time);
emit valueChanged(uasId, tr("Temp"),air_data.temperature,time); emit valueChanged(uasId, tr("Temp"),air_data.temperature,time);
emit slugsAirData(uasId, // emit slugsAirData(uasId,
air_data.dynamicPressure, // air_data.dynamicPressure,
air_data.staticPressure, // air_data.staticPressure,
air_data.temperature, // air_data.temperature,
time); // time);
break; break;
} }
...@@ -79,14 +79,15 @@ void SlugsMAV::receiveMessage(LinkInterface* link, mavlink_message_t message) ...@@ -79,14 +79,15 @@ void SlugsMAV::receiveMessage(LinkInterface* link, mavlink_message_t message)
emit valueChanged(uasId,tr("Gy Bias"),sensor_bias.gyBias,time); emit valueChanged(uasId,tr("Gy Bias"),sensor_bias.gyBias,time);
emit valueChanged(uasId,tr("Gz Bias"),sensor_bias.gzBias,time); emit valueChanged(uasId,tr("Gz Bias"),sensor_bias.gzBias,time);
emit slugsSensorBias(uasId, emit slugsSensorBias(this,
sensor_bias.axBias, sensor_bias.axBias,
sensor_bias.ayBias, sensor_bias.ayBias,
sensor_bias.azBias, sensor_bias.azBias,
sensor_bias.gxBias, sensor_bias.gxBias,
sensor_bias.gyBias, sensor_bias.gyBias,
sensor_bias.gzBias, sensor_bias.gzBias,
time); 0);
qDebug()<<"Entro";
break; break;
...@@ -103,13 +104,14 @@ void SlugsMAV::receiveMessage(LinkInterface* link, mavlink_message_t message) ...@@ -103,13 +104,14 @@ void SlugsMAV::receiveMessage(LinkInterface* link, mavlink_message_t message)
emit valueChanged(uasId,tr("Diag S2"),diagnostic.diagSh2,time); emit valueChanged(uasId,tr("Diag S2"),diagnostic.diagSh2,time);
emit valueChanged(uasId,tr("Diag S3"),diagnostic.diagSh3,time); emit valueChanged(uasId,tr("Diag S3"),diagnostic.diagSh3,time);
emit slugsDiagnostic(uasId, // emit slugsDiagnostic(uasId,
diagnostic.diagFl1, // diagnostic.diagFl1,
diagnostic.diagFl2, // diagnostic.diagFl2,
diagnostic.diagFl3, // diagnostic.diagFl3,
diagnostic.diagSh1, // diagnostic.diagSh1,
diagnostic.diagSh2, // diagnostic.diagSh2,
diagnostic.diagSh3); // diagnostic.diagSh3,
// 0);
break; break;
} }
...@@ -124,13 +126,13 @@ void SlugsMAV::receiveMessage(LinkInterface* link, mavlink_message_t message) ...@@ -124,13 +126,13 @@ void SlugsMAV::receiveMessage(LinkInterface* link, mavlink_message_t message)
emit valueChanged(uasId,"dr",pilot.dr,time); emit valueChanged(uasId,"dr",pilot.dr,time);
emit valueChanged(uasId,"de",pilot.de,time); emit valueChanged(uasId,"de",pilot.de,time);
emit slugsPilotConsolePWM(uasId, // emit slugsPilotConsolePWM(uasId,
pilot.dt, // pilot.dt,
pilot.dla, // pilot.dla,
pilot.dra, // pilot.dra,
pilot.dr, // pilot.dr,
pilot.de, // pilot.de,
time); // 0);
break; break;
...@@ -151,22 +153,23 @@ void SlugsMAV::receiveMessage(LinkInterface* link, mavlink_message_t message) ...@@ -151,22 +153,23 @@ void SlugsMAV::receiveMessage(LinkInterface* link, mavlink_message_t message)
emit valueChanged(uasId,"da1_c",pwm.aux1,time); emit valueChanged(uasId,"da1_c",pwm.aux1,time);
emit valueChanged(uasId,"da2_c",pwm.aux2,time); emit valueChanged(uasId,"da2_c",pwm.aux2,time);
emit slugsPWM(uasId, // emit slugsPWM(uasId,
pwm.dt_c, // pwm.dt_c,
pwm.dla_c, // pwm.dla_c,
pwm.dra_c, // pwm.dra_c,
pwm.dr_c, // pwm.dr_c,
pwm.dle_c, // pwm.dle_c,
pwm.dre_c, // pwm.dre_c,
pwm.dlf_c, // pwm.dlf_c,
pwm.drf_c, // pwm.drf_c,
pwm.aux1, // pwm.aux1,
pwm.aux2, // pwm.aux2,
time); // 0);
break; break;
} }
#endif #endif
default: default:
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
#include "ui_SlugsDataSensorView.h" #include "ui_SlugsDataSensorView.h"
#include <UASManager.h> #include <UASManager.h>
#include "SlugsMAV.h"
SlugsDataSensorView::SlugsDataSensorView(QWidget *parent) : SlugsDataSensorView::SlugsDataSensorView(QWidget *parent) :
QWidget(parent), QWidget(parent),
...@@ -62,12 +63,15 @@ SlugsDataSensorView::~SlugsDataSensorView() ...@@ -62,12 +63,15 @@ SlugsDataSensorView::~SlugsDataSensorView()
void SlugsDataSensorView::addUAS(UASInterface* uas) 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(slugsMav, 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(slugsMav, 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(slugsMav, 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(slugsSensorBias(UASInterface*,double,double,double,double,double,double,quint64)), this, SLOT(slugsSensorBiasAcelerometerChanged(UASInterface*,double,double,double,quint64)));
// Set this UAS as active if it is the first one // Set this UAS as active if it is the first one
if(activeUAS == 0) if(activeUAS == 0)
...@@ -115,6 +119,8 @@ void SlugsDataSensorView::refresh() ...@@ -115,6 +119,8 @@ void SlugsDataSensorView::refresh()
} }
} }
......
...@@ -35,6 +35,7 @@ This file is part of the QGROUNDCONTROL project ...@@ -35,6 +35,7 @@ This file is part of the QGROUNDCONTROL project
#include <QWidget> #include <QWidget>
#include "UASInterface.h" #include "UASInterface.h"
#include "SlugsMAV.h"
namespace Ui { namespace Ui {
class SlugsDataSensorView; class SlugsDataSensorView;
...@@ -77,25 +78,41 @@ public slots: ...@@ -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, void slugLocalPositionChanged(UASInterface* uasTemp,
double x, double x,
double y, double y,
double z, double z,
quint64 time); 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, void slugSpeedLocalPositionChanged(UASInterface* uasTemp,
double vx, double vx,
double vy, double vy,
double vz, double vz,
quint64 time); 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, void slugAttitudeChanged(UASInterface* uasTemp,
double slugroll, double slugroll,
double slugpitch, double slugpitch,
double slugyaw, double slugyaw,
quint64 time); 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, void slugsSensorBiasChanged(UASInterface* uasTemp,
double axb, double axb,
double ayb, double ayb,
...@@ -104,6 +121,19 @@ public slots: ...@@ -104,6 +121,19 @@ public slots:
double gyb, double gyb,
double gzb, double gzb,
quint64 time); 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: protected:
QTimer* updateTimer; QTimer* updateTimer;
...@@ -138,7 +168,14 @@ protected: ...@@ -138,7 +168,14 @@ protected:
double Gzb; double Gzb;
quint64 TimeActualBias; 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