diff --git a/src/ui/HSIDisplay.cc b/src/ui/HSIDisplay.cc index bdccbf302d3f0476ecf7be54c960ef86a058df9b..645d2832d3bdc6dffa7482e6ba90c31f80554df5 100644 --- a/src/ui/HSIDisplay.cc +++ b/src/ui/HSIDisplay.cc @@ -665,6 +665,7 @@ void HSIDisplay::drawWaypoints(QPainter& painter) QPen pen(color); pen.setWidthF(refLineWidthToPen(0.4f)); painter.setPen(pen); + painter.setBrush(Qt::NoBrush); // Draw line from last waypoint to this one if (!lastWaypoint.isNull()) diff --git a/src/ui/UASControl.ui b/src/ui/UASControl.ui index c1a095749e0cb2cde8db34ff6ce149fb01b79d85..bc34fd146b929d2281b9ca6962fe1b74888364c3 100644 --- a/src/ui/UASControl.ui +++ b/src/ui/UASControl.ui @@ -6,14 +6,20 @@ 0 0 - 380 - 190 + 280 + 164 + + + 280 + 130 + + Form - + 6 @@ -147,10 +153,13 @@ Qt::Vertical + + QSizePolicy::Expanding + - 20 - 0 + 0 + 1 diff --git a/src/ui/UASInfo.ui b/src/ui/UASInfo.ui index 029e796c19b97702463ec9d0556510d933d2d09c..a86c9a2623c27ad2c2a54915c61e67acdba7933f 100644 --- a/src/ui/UASInfo.ui +++ b/src/ui/UASInfo.ui @@ -287,7 +287,7 @@ - CPU Load + MCU Load @@ -370,14 +370,14 @@ - + Qt::Horizontal - + Qt::Vertical @@ -393,13 +393,69 @@ - + No error status received yet + + + + CPU Load + + + + + + + 0 + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + % + + + + + + + + 16777215 + 20 + + + + + 0 + 18 + + + + 24 + + + + + + + Qt::Horizontal + + + + 13 + 15 + + + + diff --git a/src/ui/uas/UASControlWidget.cc b/src/ui/uas/UASControlWidget.cc index 31fbc7df8d61d04ad57b420b5cb249969ae539de..0ac7a740a5b6da061d302b96b52b647bd8a8e53d 100644 --- a/src/ui/uas/UASControlWidget.cc +++ b/src/ui/uas/UASControlWidget.cc @@ -201,16 +201,14 @@ void UASControlWidget::cycleContextButton() if (!engineOn) { ui.controlButton->setText(tr("Stop Engine")); - mav->setMode(MAV_MODE_MANUAL); mav->enable_motors(); - ui.lastActionLabel->setText(QString("Enabled motors on %1").arg(uas->getUASName())); + ui.lastActionLabel->setText(QString("Attempted to enable motors on %1").arg(uas->getUASName())); } else { ui.controlButton->setText(tr("Activate Engine")); - mav->setMode(MAV_MODE_LOCKED); mav->disable_motors(); - ui.lastActionLabel->setText(QString("Disabled motors on %1").arg(uas->getUASName())); + ui.lastActionLabel->setText(QString("Attempted to disable motors on %1").arg(uas->getUASName())); } //ui.controlButton->setText(tr("Force Landing")); //ui.controlButton->setText(tr("KILL VEHICLE")); diff --git a/src/ui/uas/UASView.cc b/src/ui/uas/UASView.cc index defc81c479a48ee3069beb6351d6fc6114a342e3..18ff0086c799796d934be83df476a10bf768f043 100644 --- a/src/ui/uas/UASView.cc +++ b/src/ui/uas/UASView.cc @@ -36,6 +36,7 @@ This file is part of the PIXHAWK project #include "MG.h" #include "UASManager.h" #include "UASView.h" +#include "UASWaypointManager.h" #include "ui_UASView.h" UASView::UASView(UASInterface* uas, QWidget *parent) : @@ -75,6 +76,7 @@ UASView::UASView(UASInterface* uas, QWidget *parent) : connect(uas, SIGNAL(loadChanged(UASInterface*, double)), this, SLOT(updateLoad(UASInterface*, double))); //connect(uas, SIGNAL(waypointUpdated(int,int,double,double,double,double,bool,bool)), this, SLOT(setWaypoint(int,int,double,double,double,double,bool,bool))); connect(uas, SIGNAL(waypointSelected(int,int)), this, SLOT(selectWaypoint(int,int))); + connect(&(uas->getWaypointManager()), SIGNAL(currentWaypointChanged(quint16)), this, SLOT(currentWaypointUpdated(quint16))); connect(uas, SIGNAL(systemTypeSet(UASInterface*,uint)), this, SLOT(setSystemType(UASInterface*,uint))); // Setup UAS selection @@ -251,6 +253,11 @@ void UASView::updateSpeed(UASInterface*, double x, double y, double z, quint64 u totalSpeed = sqrt((pow(x, 2) + pow(y, 2) + pow(z, 2))); } +void UASView::currentWaypointUpdated(quint16 waypoint) +{ + m_ui->waypointLabel->setText(tr("WP") + QString::number(waypoint)); +} + void UASView::setWaypoint(int uasId, int id, double x, double y, double z, double yaw, bool autocontinue, bool current) { Q_UNUSED(x); diff --git a/src/ui/uas/UASView.h b/src/ui/uas/UASView.h index 928423e35d2589e5583765583c353b50eba1c681..7f57f808460b4734af3fd5cbfbd4889af2ccba2f 100644 --- a/src/ui/uas/UASView.h +++ b/src/ui/uas/UASView.h @@ -63,6 +63,8 @@ public slots: void refresh(); /** @brief Receive new waypoint information */ void setWaypoint(int uasId, int id, double x, double y, double z, double yaw, bool autocontinue, bool current); + /** @brief Update the current active waypoint */ + void currentWaypointUpdated(quint16 waypoint); /** @brief Set waypoint as current target */ void selectWaypoint(int uasId, int id); /** @brief Set the current system type */