1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-23 16:25:31 +03:00

Add gyro rate checking to runaway takeoff activation to improve bench testing

Changed the triggering phase so that in addition to the pidSum needing to exceed runaway_takeoff_threshold, the gyro rate on any axis must exceed a threshold value to indicate the quad is actually moving. The threshold for the yaw axis is much higher since the torque of the motors can still yaw the craft without props.
This commit is contained in:
Bruce Luckcuck 2018-02-17 14:18:21 -05:00
parent 7c3bb49759
commit 9ea965c549
3 changed files with 16 additions and 3 deletions

View file

@ -915,3 +915,8 @@ bool gyroOverflowDetected(void)
{
return gyroSensor1.overflowDetected;
}
uint16_t gyroAbsRateDps(int axis)
{
return fabsf(gyro.gyroADCf[axis]);
}

View file

@ -96,3 +96,4 @@ void gyroReadTemperature(void);
int16_t gyroGetTemperature(void);
int16_t gyroRateDps(int axis);
bool gyroOverflowDetected(void);
uint16_t gyroAbsRateDps(int axis);