From 0c884ed14d5a73d61a9ddb7e1219117834e05680 Mon Sep 17 00:00:00 2001 From: edouard Date: Sun, 5 Sep 2010 17:30:49 +0000 Subject: [PATCH] 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 --- ground/src/plugins/pfd/pfdgadgetwidget.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ground/src/plugins/pfd/pfdgadgetwidget.cpp b/ground/src/plugins/pfd/pfdgadgetwidget.cpp index 98f14a439..574b035fc 100644 --- a/ground/src/plugins/pfd/pfdgadgetwidget.cpp +++ b/ground/src/plugins/pfd/pfdgadgetwidget.cpp @@ -239,13 +239,13 @@ void PFDGadgetWidget::updateAttitude(UAVObject *object1) { // TODO: loosen this constraint and only require a +/- 20 deg range, // and compute the height from the SVG element. // 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) { rollValue += 360; } else if (((rollTarget - rollValue) < -180)) { 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: // - Heading value in degrees