Commit 6be09149 authored by lm's avatar lm

Fixed packet drop counting / handling

parent c7c59937
...@@ -221,7 +221,8 @@ void UAS::receiveMessage(LinkInterface* link, mavlink_message_t message) ...@@ -221,7 +221,8 @@ void UAS::receiveMessage(LinkInterface* link, mavlink_message_t message)
} }
// COMMUNICATIONS DROP RATE // COMMUNICATIONS DROP RATE
emit dropRateChanged(this->getUASID(), this->receiveDropRate, this->sendDropRate); emit dropRateChanged(this->getUASID(), state.packet_drop);
qDebug() << __FILE__ << __LINE__ << "RCV LOSS: " << state.packet_drop;
// AUDIO // AUDIO
if (modechanged && statechanged) if (modechanged && statechanged)
......
...@@ -233,10 +233,9 @@ signals: ...@@ -233,10 +233,9 @@ signals:
* @brief Drop rate of communication link updated * @brief Drop rate of communication link updated
* *
* @param systemId id of the air system * @param systemId id of the air system
* @param receiveDrop drop rate of packets this MAV receives (send from GCS or other MAVs) * @param receiveDrop drop rate of packets this MAV receives (sent from GCS or other MAVs)
* @param sendDrop drop rate of packets this MAV sends (received on GCS)
*/ */
void dropRateChanged(int systemId, float receiveDrop, float sendDrop); void dropRateChanged(int systemId, float receiveDrop);
/** @brief Robot mode has changed */ /** @brief Robot mode has changed */
void modeChanged(int sysId, QString status, QString description); void modeChanged(int sysId, QString status, QString description);
/** @brief A command has been issued **/ /** @brief A command has been issued **/
......
...@@ -166,7 +166,7 @@ settings() ...@@ -166,7 +166,7 @@ settings()
adjustSize(); adjustSize();
// //
connect(mavlink, SIGNAL(receiveLossChanged(float)), info, SLOT(updateReceiveLoss(float))); connect(mavlink, SIGNAL(receiveLossChanged(float)), info, SLOT(updateSendLoss(float)));
} }
MainWindow::~MainWindow() MainWindow::~MainWindow()
...@@ -377,7 +377,6 @@ void MainWindow::clearView() ...@@ -377,7 +377,6 @@ void MainWindow::clearView()
void MainWindow::loadPilotView() void MainWindow::loadPilotView()
{ {
clearView(); clearView();
GAudioOutput::instance()->say("Switched to Pilot View");
// HEAD UP DISPLAY // HEAD UP DISPLAY
centerStack->setCurrentWidget(hud); centerStack->setCurrentWidget(hud);
...@@ -402,8 +401,6 @@ void MainWindow::loadOperatorView() ...@@ -402,8 +401,6 @@ void MainWindow::loadOperatorView()
{ {
clearView(); clearView();
GAudioOutput::instance()->say("Switched to Operator View");
// MAP // MAP
centerStack->setCurrentWidget(map); centerStack->setCurrentWidget(map);
...@@ -448,8 +445,6 @@ void MainWindow::loadSettingsView() ...@@ -448,8 +445,6 @@ void MainWindow::loadSettingsView()
{ {
clearView(); clearView();
GAudioOutput::instance()->say("Switched to Settings View");
// LINE CHART // LINE CHART
linechart->setActive(true); linechart->setActive(true);
centerStack->setCurrentWidget(linechart); centerStack->setCurrentWidget(linechart);
...@@ -472,8 +467,6 @@ void MainWindow::loadEngineerView() ...@@ -472,8 +467,6 @@ void MainWindow::loadEngineerView()
clearView(); clearView();
// Engineer view, used in EMAV2009 // Engineer view, used in EMAV2009
GAudioOutput::instance()->say("Switched to Engineer View");
// LINE CHART // LINE CHART
linechart->setActive(true); linechart->setActive(true);
centerStack->setCurrentWidget(linechart); centerStack->setCurrentWidget(linechart);
...@@ -516,7 +509,6 @@ void MainWindow::loadMAVLinkView() ...@@ -516,7 +509,6 @@ void MainWindow::loadMAVLinkView()
void MainWindow::loadAllView() void MainWindow::loadAllView()
{ {
clearView(); clearView();
GAudioOutput::instance()->say("Loaded complete view");
QDockWidget* containerPFD = new QDockWidget(tr("Primary Flight Display"), this); QDockWidget* containerPFD = new QDockWidget(tr("Primary Flight Display"), this);
containerPFD->setWidget(headDown1); containerPFD->setWidget(headDown1);
......
...@@ -23,7 +23,7 @@ This file is part of the PIXHAWK project ...@@ -23,7 +23,7 @@ This file is part of the PIXHAWK project
/** /**
* @file * @file
* @brief Brief Description * @brief Implementation of class UASInfoWidget
* *
* @author Lorenz Meier <mavteam@student.ethz.ch> * @author Lorenz Meier <mavteam@student.ethz.ch>
* *
...@@ -86,7 +86,7 @@ void UASInfoWidget::addUAS(UASInterface* uas) ...@@ -86,7 +86,7 @@ void UASInfoWidget::addUAS(UASInterface* uas)
if (uas != NULL) if (uas != NULL)
{ {
connect(uas, SIGNAL(batteryChanged(UASInterface*,double,double,int)), this, SLOT(updateBattery(UASInterface*,double,double,int))); connect(uas, SIGNAL(batteryChanged(UASInterface*,double,double,int)), this, SLOT(updateBattery(UASInterface*,double,double,int)));
connect(uas, SIGNAL(dropRateChanged(int,float,float)), this, SLOT(updateDropRate(int,float,float))); connect(uas, SIGNAL(dropRateChanged(int,float)), this, SLOT(updateReceiveLoss(int,float)));
connect(uas, SIGNAL(loadChanged(UASInterface*, double)), this, SLOT(updateCPULoad(UASInterface*,double))); connect(uas, SIGNAL(loadChanged(UASInterface*, double)), this, SLOT(updateCPULoad(UASInterface*,double)));
// Set this UAS as active if it is the first one // Set this UAS as active if it is the first one
......
...@@ -14,11 +14,11 @@ WatchdogControl::WatchdogControl(QWidget *parent) : ...@@ -14,11 +14,11 @@ WatchdogControl::WatchdogControl(QWidget *parent) :
ui->setupUi(this); ui->setupUi(this);
// UI is initialized, setup layout // UI is initialized, setup layout
listLayout = new QVBoxLayout(m_ui->listWidget); listLayout = new QVBoxLayout(ui->mainWidget);
listLayout->setSpacing(6); listLayout->setSpacing(6);
listLayout->setMargin(0); listLayout->setMargin(0);
listLayout->setAlignment(Qt::AlignTop); listLayout->setAlignment(Qt::AlignTop);
m_ui->listWidget->setLayout(listLayout); ui->mainWidget->setLayout(listLayout);
connect(UASManager::instance(), SIGNAL(UASCreated(UASInterface*)), this, SLOT(setUAS(UASInterface*))); connect(UASManager::instance(), SIGNAL(UASCreated(UASInterface*)), this, SLOT(setUAS(UASInterface*)));
} }
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
#include <QWidget> #include <QWidget>
#include <QTimer> #include <QTimer>
#include <QHBoxLayout> #include <QVBoxLayout>
#include <map> #include <map>
#include <string> #include <string>
...@@ -115,7 +115,7 @@ protected: ...@@ -115,7 +115,7 @@ protected:
void changeEvent(QEvent *e); void changeEvent(QEvent *e);
UASInterface* mav; UASInterface* mav;
QHBoxLayout* mainWidgetLayout; QVBoxLayout* listLayout;
private: private:
Ui::WatchdogControl *ui; Ui::WatchdogControl *ui;
......
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