1
0
Fork 0
mirror of https://github.com/iNavFlight/inav.git synced 2025-07-26 01:35:35 +03:00

hardware status monitoring - generic interface

This commit is contained in:
Krzysztof Matula 2016-11-03 00:06:53 +01:00 committed by Konstantin Sharlaimov (DigitalEntity)
parent d4efddcbf4
commit ab29fb8f9f
7 changed files with 40 additions and 11 deletions

View file

@ -423,11 +423,6 @@ static int imuCalculateAccelerometerConfidence(void)
return (nearness > MAX_ACC_SQ_NEARNESS) ? 0 : MAX_ACC_SQ_NEARNESS - nearness;
}
static bool isMagnetometerHealthy(void)
{
return (mag.magADC[X] != 0) && (mag.magADC[Y] != 0) && (mag.magADC[Z] != 0);
}
static void imuCalculateEstimatedAttitude(float dT)
{
const bool canUseMAG = sensors(SENSOR_MAG) && isMagnetometerHealthy();