Browse Source

Improved speed by preventing update of UASView on every vehicle state change, view is now bound to 10 Hz update timer

QGC4.4
lm 15 years ago
parent
commit
fefea1c00e
  1. 4
      src/ui/uas/UASView.cc
  2. 12
      src/ui/uas/UASView.h

4
src/ui/uas/UASView.cc

@ -312,7 +312,7 @@ void UASView::refresh() @@ -312,7 +312,7 @@ void UASView::refresh()
m_ui->thrustBar->setValue(this->thrust);
// Position
//QString position;
QString position;
position = position.sprintf("%02.2f %02.2f %02.2f m", x, y, z);
m_ui->positionLabel->setText(position);
QString globalPosition;
@ -320,7 +320,7 @@ void UASView::refresh() @@ -320,7 +320,7 @@ void UASView::refresh()
m_ui->gpsLabel->setText(globalPosition);
// Speed
QString speed;
QString speed;
speed = speed.sprintf("%02.2f m/s", totalSpeed);
m_ui->speedLabel->setText(speed);

12
src/ui/uas/UASView.h

@ -78,14 +78,22 @@ protected: @@ -78,14 +78,22 @@ protected:
QColor heartbeatColor;
quint64 startTime;
int timeRemaining;
double chargeLevel;
float chargeLevel;
UASInterface* uas;
double load;
float load;
QString state;
QString stateDesc;
QString mode;
double thrust; ///< Current vehicle thrust: 0 - 1.0 for 100% thrust
bool isActive; ///< Is this MAV selected by the user?
float x;
float y;
float z;
float totalSpeed;
float lat;
float lon;
float alt;
void mouseDoubleClickEvent (QMouseEvent * event);
/** @brief Mouse enters the widget */

Loading…
Cancel
Save