mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-23 16:25:31 +03:00
Yaw spin recovery optimize (#3)
* PID controller unittest * Clean code for yaw spin recovery * Yaw spin recovery optimizations * Flash size optimizations, use 50% throttle when airmode is off, and override pidsum_limit_yaw Also rebasing from betaflight/master
This commit is contained in:
parent
41fb37a264
commit
0a0add8c56
5 changed files with 28 additions and 13 deletions
|
@ -1014,8 +1014,7 @@ static void checkForYawSpin(gyroSensor_t *gyroSensor, timeUs_t currentTimeUs)
|
|||
} else {
|
||||
#ifndef SIMULATOR_BUILD
|
||||
// check for spin on yaw axis only
|
||||
const float yawSpinTriggerRate = gyroConfig()->yaw_spin_threshold;
|
||||
if (abs(gyro.gyroADCf[Z]) > yawSpinTriggerRate) {
|
||||
if (abs(gyro.gyroADCf[Z]) > gyroConfig()->yaw_spin_threshold) {
|
||||
gyroSensor->yawSpinDetected = true;
|
||||
gyroSensor->yawSpinTimeUs = currentTimeUs;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue