1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2025-01-18 03:52:11 +01:00

Fix for PFD gadget so that it does not freeze the GCS in case attitude values are "NaN", which can happen in some situations with the AHRS.

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1415 ebee16cc-31ac-478f-84a7-5cbb03baadba
This commit is contained in:
edouard 2010-08-26 12:58:57 +00:00 committed by edouard
parent c07e1416b7
commit 828363948d

View File

@ -789,6 +789,13 @@ void PFDGadgetWidget::moveSky() {
return; return;
} }
// In some instances, it can happen that the rollValue & target are
// invalid inside the UAVObjects, and become a "nan" value, which freezes
// the PFD and the whole GCS: for this reason, we check this here.
// The strange check below works, it is a workaround because "isnan(double)"
// is not supported on every compiler.
if (rollTarget != rollTarget || pitchTarget != pitchTarget)
return;
////// //////
// Roll // Roll
////// //////