Use isAllFinite() in all places that check finiteness on entire vectors or matrices

This commit is contained in:
Matthias Grob
2022-10-19 19:09:20 +02:00
parent 93de9567a5
commit 5ca28dd6dc
38 changed files with 128 additions and 252 deletions
+1 -1
View File
@@ -111,7 +111,7 @@ void Gyroscope::SensorCorrectionsUpdate(bool force)
bool Gyroscope::set_offset(const Vector3f &offset)
{
if (Vector3f(_offset - offset).longerThan(0.01f) || (_calibration_count == 0)) {
if (PX4_ISFINITE(offset(0)) && PX4_ISFINITE(offset(1)) && PX4_ISFINITE(offset(2))) {
if (offset.isAllFinite()) {
_offset = offset;
_calibration_count++;
return true;