1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-19 22:35:23 +03:00

Fix small angle check when ACC is disabled or not defined

Fixes related to #9185
This commit is contained in:
Bruce Luckcuck 2019-11-19 18:08:41 -05:00
parent 881a256980
commit f35dd086ac
2 changed files with 6 additions and 3 deletions

View file

@ -724,5 +724,9 @@ void imuQuaternionHeadfreeTransformVectorEarthToBody(t_fp_vector_def *v)
bool isUpright(void)
{
return attitudeIsEstablished && getCosTiltAngle() > smallAngleCosZ;
#ifdef USE_ACC
return !sensors(SENSOR_ACC) || (attitudeIsEstablished && getCosTiltAngle() > smallAngleCosZ);
#else
return true;
#endif
}