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:
parent
c07e1416b7
commit
828363948d
@ -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
|
||||||
//////
|
//////
|
||||||
|
Loading…
x
Reference in New Issue
Block a user