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:
parent
608297fbd3
commit
6174fa2d7f
@ -48,6 +48,28 @@ Rectangle {
|
||||
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 {
|
||||
anchors.fill: parent
|
||||
sceneSize: background.sceneSize
|
||||
|
@ -51,6 +51,7 @@ PfdQmlGadgetWidget::PfdQmlGadgetWidget(QWidget *parent) :
|
||||
objectsToExport << "VelocityActual" <<
|
||||
"PositionActual" <<
|
||||
"AttitudeActual" <<
|
||||
"Accels" <<
|
||||
"VelocityDesired" <<
|
||||
"PositionDesired" <<
|
||||
"AttitudeHoldDesired" <<
|
||||
|
Loading…
x
Reference in New Issue
Block a user