diff --git a/src/uas/UAS.cc b/src/uas/UAS.cc index f9792b0afcc5af15699ff6652f5b0a6e9e512213..238ea45f80ec5aad9a726f135f05f8500b2acd50 100644 --- a/src/uas/UAS.cc +++ b/src/uas/UAS.cc @@ -221,7 +221,8 @@ void UAS::receiveMessage(LinkInterface* link, mavlink_message_t message) } // 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 if (modechanged && statechanged) diff --git a/src/uas/UASInterface.h b/src/uas/UASInterface.h index 0002a002811c4037c5572283edc8e97e7f44637b..4758a08a5c7503f1edadbee61020da1b396e32ab 100644 --- a/src/uas/UASInterface.h +++ b/src/uas/UASInterface.h @@ -233,10 +233,9 @@ signals: * @brief Drop rate of communication link updated * * @param systemId id of the air system - * @param receiveDrop drop rate of packets this MAV receives (send from GCS or other MAVs) - * @param sendDrop drop rate of packets this MAV sends (received on GCS) + * @param receiveDrop drop rate of packets this MAV receives (sent from GCS or other MAVs) */ - void dropRateChanged(int systemId, float receiveDrop, float sendDrop); + void dropRateChanged(int systemId, float receiveDrop); /** @brief Robot mode has changed */ void modeChanged(int sysId, QString status, QString description); /** @brief A command has been issued **/ diff --git a/src/ui/MainWindow.cc b/src/ui/MainWindow.cc index aa01f88701f3b3cf018677dc13014f8725d40f95..f6c29bf023429574ccc0ebce7250439eae8b3cd4 100644 --- a/src/ui/MainWindow.cc +++ b/src/ui/MainWindow.cc @@ -166,7 +166,7 @@ settings() adjustSize(); // - connect(mavlink, SIGNAL(receiveLossChanged(float)), info, SLOT(updateReceiveLoss(float))); + connect(mavlink, SIGNAL(receiveLossChanged(float)), info, SLOT(updateSendLoss(float))); } MainWindow::~MainWindow() @@ -377,7 +377,6 @@ void MainWindow::clearView() void MainWindow::loadPilotView() { clearView(); - GAudioOutput::instance()->say("Switched to Pilot View"); // HEAD UP DISPLAY centerStack->setCurrentWidget(hud); @@ -402,8 +401,6 @@ void MainWindow::loadOperatorView() { clearView(); - GAudioOutput::instance()->say("Switched to Operator View"); - // MAP centerStack->setCurrentWidget(map); @@ -448,8 +445,6 @@ void MainWindow::loadSettingsView() { clearView(); - GAudioOutput::instance()->say("Switched to Settings View"); - // LINE CHART linechart->setActive(true); centerStack->setCurrentWidget(linechart); @@ -472,8 +467,6 @@ void MainWindow::loadEngineerView() clearView(); // Engineer view, used in EMAV2009 - GAudioOutput::instance()->say("Switched to Engineer View"); - // LINE CHART linechart->setActive(true); centerStack->setCurrentWidget(linechart); @@ -516,7 +509,6 @@ void MainWindow::loadMAVLinkView() void MainWindow::loadAllView() { clearView(); - GAudioOutput::instance()->say("Loaded complete view"); QDockWidget* containerPFD = new QDockWidget(tr("Primary Flight Display"), this); containerPFD->setWidget(headDown1); diff --git a/src/ui/uas/UASInfoWidget.cc b/src/ui/uas/UASInfoWidget.cc index d1e348f035e512c4cb5b6958aa3e59a8a10cb72d..989be0d448e2ca7d698f43371cdcb0d483d31a10 100644 --- a/src/ui/uas/UASInfoWidget.cc +++ b/src/ui/uas/UASInfoWidget.cc @@ -23,7 +23,7 @@ This file is part of the PIXHAWK project /** * @file - * @brief Brief Description + * @brief Implementation of class UASInfoWidget * * @author Lorenz Meier * @@ -86,7 +86,7 @@ void UASInfoWidget::addUAS(UASInterface* uas) if (uas != NULL) { 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))); // Set this UAS as active if it is the first one diff --git a/src/ui/watchdog/WatchdogControl.cc b/src/ui/watchdog/WatchdogControl.cc index 12655dc5236b1e43762df09bc9a9839b7c3837ca..d9ec97d2cdbaa1488a956649db5a9a224d19f77d 100644 --- a/src/ui/watchdog/WatchdogControl.cc +++ b/src/ui/watchdog/WatchdogControl.cc @@ -14,11 +14,11 @@ WatchdogControl::WatchdogControl(QWidget *parent) : ui->setupUi(this); // UI is initialized, setup layout - listLayout = new QVBoxLayout(m_ui->listWidget); + listLayout = new QVBoxLayout(ui->mainWidget); listLayout->setSpacing(6); listLayout->setMargin(0); listLayout->setAlignment(Qt::AlignTop); - m_ui->listWidget->setLayout(listLayout); + ui->mainWidget->setLayout(listLayout); connect(UASManager::instance(), SIGNAL(UASCreated(UASInterface*)), this, SLOT(setUAS(UASInterface*))); } diff --git a/src/ui/watchdog/WatchdogControl.h b/src/ui/watchdog/WatchdogControl.h index 0559d6b50038a7b36b5d4db46e59211a8d54f2d9..a91574b0ebbacb8de4e74646dd3f03a05d7a66fd 100644 --- a/src/ui/watchdog/WatchdogControl.h +++ b/src/ui/watchdog/WatchdogControl.h @@ -5,7 +5,7 @@ #include #include -#include +#include #include #include @@ -115,7 +115,7 @@ protected: void changeEvent(QEvent *e); UASInterface* mav; - QHBoxLayout* mainWidgetLayout; + QVBoxLayout* listLayout; private: Ui::WatchdogControl *ui;