1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2025-03-01 18:29:16 +01:00

OP-539: Don't call the gyro setting callback during init because it clears the

gyro bias estimation.
This commit is contained in:
James Cotton 2011-07-05 22:23:59 -05:00
parent ad8876c62a
commit 2d995dc2f7

View File

@ -136,16 +136,16 @@ static void AttitudeTask(void *parameters)
PIOS_FLASH_DISABLE; PIOS_FLASH_DISABLE;
PIOS_ADXL345_Init(); PIOS_ADXL345_Init();
zero_during_arming = false; // Force settings update to make sure rotation loaded
settingsUpdatedCb(AttitudeSettingsHandle());
// Main task loop // Main task loop
while (1) { while (1) {
FlightStatusData flightStatus; FlightStatusData flightStatus;
FlightStatusGet(&flightStatus); FlightStatusGet(&flightStatus);
if(xTaskGetTickCount() < 7000) { if((xTaskGetTickCount() < 7000) && (xTaskGetTickCount() > 1000)) {
// Force settings update to make sure rotation loaded
settingsUpdatedCb(AttitudeSettingsHandle());
// For first 7 seconds use accels to get gyro bias // For first 7 seconds use accels to get gyro bias
accelKp = 1; accelKp = 1;
accelKi = 0.9; accelKi = 0.9;