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

AHRS: FIx calibration. Move the mag data processing into the loop that acquires accel and gyro

data.  I don't like this but because of the way the calibration routine works
(sets all gains to 1) this makes the values so far out or range the EKF doesn't
get to run and the mag wasn't previously being updated.

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2765 ebee16cc-31ac-478f-84a7-5cbb03baadba
This commit is contained in:
peabody124 2011-02-09 05:17:32 +00:00 committed by peabody124
parent b793a33baf
commit ebb8596db0

View File

@ -645,8 +645,6 @@ for all data to be up to date before doing anything*/
idle_counts = counter_val - last_counter_idle_start;
last_counter_idle_end = counter_val;
process_mag_data();
print_ekf_binary();
/* If algorithm changed reinit. This could go in callback but wouldn't be synchronous */
@ -684,6 +682,7 @@ bool get_accel_gyro_data()
while(fifoBuf_getUsed(&adc_fifo_buffer) < (sizeof(accel) + sizeof(gyro))) {
if(spin_count++ == 0)
AhrsPoll();
process_mag_data();
}
fifoBuf_getData(&adc_fifo_buffer, &accel[0], sizeof(float) * 3);