1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2025-01-30 15:52:12 +01:00

PFD: display the side-slip indicator

This commit is contained in:
Dmytro Poplavskiy 2012-09-20 09:17:10 +10:00
parent 608297fbd3
commit 6174fa2d7f
2 changed files with 23 additions and 0 deletions

View File

@ -48,6 +48,28 @@ Rectangle {
anchors.centerIn: parent anchors.centerIn: parent
} }
SvgElementImage {
id: side_slip
elementName: "sideslip"
sceneSize: background.sceneSize
smooth: true
property real sideSlip: Accels.y
//smooth side slip changes, a low pass filter replacement
//accels are updated once per second
Behavior on sideSlip {
SmoothedAnimation {
duration: 1000
velocity: -1
}
}
anchors.horizontalCenter: foreground.horizontalCenter
//0.5 coefficient is empirical to limit indicator movement
anchors.horizontalCenterOffset: -sideSlip*width*0.5
y: scaledBounds.y * sceneItem.height
}
Compass { Compass {
anchors.fill: parent anchors.fill: parent
sceneSize: background.sceneSize sceneSize: background.sceneSize

View File

@ -51,6 +51,7 @@ PfdQmlGadgetWidget::PfdQmlGadgetWidget(QWidget *parent) :
objectsToExport << "VelocityActual" << objectsToExport << "VelocityActual" <<
"PositionActual" << "PositionActual" <<
"AttitudeActual" << "AttitudeActual" <<
"Accels" <<
"VelocityDesired" << "VelocityDesired" <<
"PositionDesired" << "PositionDesired" <<
"AttitudeHoldDesired" << "AttitudeHoldDesired" <<