mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-02-18 08:54:15 +01:00
CC-20 Attitude initialization: Make sure no divide by 0 condition possible
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2761 ebee16cc-31ac-478f-84a7-5cbb03baadba
This commit is contained in:
parent
9ed0882df9
commit
8498512855
@ -137,7 +137,7 @@ static void AttitudeTask(void *parameters)
|
||||
// For first 5 seconds use accels to get gyro bias
|
||||
accelKp = 1;
|
||||
// Decrease the rate of gyro learning during init
|
||||
accelKi = .1 / (xTaskGetTickCount() / 5000);
|
||||
accelKi = .5 / (1 + xTaskGetTickCount() / 5000);
|
||||
} else if (init == 0) {
|
||||
settingsUpdatedCb(AttitudeSettingsHandle());
|
||||
init = 1;
|
||||
|
Loading…
x
Reference in New Issue
Block a user