mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2024-12-03 11:24:10 +01:00
OP-136 Ground/PFD Fixed issue where pitch value was used for roll settings. What was it about the monkey again? ;-)
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1539 ebee16cc-31ac-478f-84a7-5cbb03baadba
This commit is contained in:
parent
7ef12a801e
commit
0c884ed14d
@ -239,13 +239,13 @@ void PFDGadgetWidget::updateAttitude(UAVObject *object1) {
|
|||||||
// TODO: loosen this constraint and only require a +/- 20 deg range,
|
// TODO: loosen this constraint and only require a +/- 20 deg range,
|
||||||
// and compute the height from the SVG element.
|
// and compute the height from the SVG element.
|
||||||
// Also: keep the integer value only, to avoid unnecessary redraws
|
// Also: keep the integer value only, to avoid unnecessary redraws
|
||||||
rollTarget = -floor(pitchField->getDouble()*10)/10;
|
rollTarget = -floor(rollField->getDouble()*10)/10;
|
||||||
if ((rollTarget - rollValue) > 180) {
|
if ((rollTarget - rollValue) > 180) {
|
||||||
rollValue += 360;
|
rollValue += 360;
|
||||||
} else if (((rollTarget - rollValue) < -180)) {
|
} else if (((rollTarget - rollValue) < -180)) {
|
||||||
rollValue -= 360;
|
rollValue -= 360;
|
||||||
}
|
}
|
||||||
pitchTarget = floor(object1->getField(QString("Pitch"))->getDouble()*7.5);
|
pitchTarget = floor(pitchField->getDouble()*7.5);
|
||||||
|
|
||||||
// These factors assume some things about the PFD SVG, namely:
|
// These factors assume some things about the PFD SVG, namely:
|
||||||
// - Heading value in degrees
|
// - Heading value in degrees
|
||||||
|
Loading…
Reference in New Issue
Block a user