mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2024-12-01 09:24:10 +01:00
added tooltip to the pfd stating the current refresh rate
This commit is contained in:
parent
0875831f6d
commit
a1f3035f15
@ -74,6 +74,7 @@ PFDGadgetWidget::PFDGadgetWidget(QWidget *parent) : QGraphicsView(parent)
|
||||
connect(&skyDialTimer, SIGNAL(timeout()), this, SLOT(moveSky()));
|
||||
skyDialTimer.start(30);
|
||||
|
||||
|
||||
}
|
||||
|
||||
PFDGadgetWidget::~PFDGadgetWidget()
|
||||
@ -82,6 +83,14 @@ PFDGadgetWidget::~PFDGadgetWidget()
|
||||
dialTimer.stop();
|
||||
}
|
||||
|
||||
void PFDGadgetWidget::setToolTipPrivate()
|
||||
{
|
||||
static qint32 updateRate=0;
|
||||
UAVObject::Metadata mdata=attitudeObj->getMetadata();
|
||||
if(mdata.flightTelemetryUpdatePeriod!=updateRate)
|
||||
this->setToolTip("Current refresh rate:"+QString::number(mdata.flightTelemetryUpdatePeriod)+" miliseconds"+"\nIf you want to change it please edit the AttitudeActual metadata on the object browser.");
|
||||
}
|
||||
|
||||
/*!
|
||||
\brief Enables/Disables OpenGL
|
||||
*/
|
||||
@ -174,7 +183,6 @@ void PFDGadgetWidget::connectNeedles() {
|
||||
qDebug() << "Error: Object is unknown (FlightBatteryState).";
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -229,6 +237,7 @@ void PFDGadgetWidget::updateLinkStatus(UAVObject *object1) {
|
||||
Resolution is 1 degree roll & 1/7.5 degree pitch.
|
||||
*/
|
||||
void PFDGadgetWidget::updateAttitude(UAVObject *object1) {
|
||||
setToolTipPrivate();
|
||||
UAVObjectField * rollField = object1->getField(QString("Roll"));
|
||||
UAVObjectField * yawField = object1->getField(QString("Yaw"));
|
||||
UAVObjectField * pitchField = object1->getField(QString("Pitch"));
|
||||
|
@ -54,6 +54,7 @@ public:
|
||||
void setHqFonts(bool flag) { hqFonts = flag; }
|
||||
void enableSmoothUpdates(bool flag) { beSmooth = flag; }
|
||||
|
||||
|
||||
public slots:
|
||||
void updateAttitude(UAVObject *object1);
|
||||
void updateHeading(UAVObject *object1);
|
||||
@ -72,7 +73,7 @@ private slots:
|
||||
void moveNeedles();
|
||||
void moveVerticalScales();
|
||||
void moveSky();
|
||||
|
||||
void setToolTipPrivate();
|
||||
private:
|
||||
QSvgRenderer *m_renderer;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user