Commit fefea1c0 authored by lm's avatar lm

Improved speed by preventing update of UASView on every vehicle state change,...

Improved speed by preventing update of UASView on every vehicle state change, view is now bound to 10 Hz update timer
parent c3f6181f
......@@ -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()
m_ui->gpsLabel->setText(globalPosition);
// Speed
QString speed;
QString speed;
speed = speed.sprintf("%02.2f m/s", totalSpeed);
m_ui->speedLabel->setText(speed);
......
......@@ -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 */
......
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