mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-02-20 10:54:14 +01:00
AHRS: Move getting mag data back into the main loop
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2998 ebee16cc-31ac-478f-84a7-5cbb03baadba
This commit is contained in:
parent
aea0695f70
commit
b2abc73ae3
@ -623,7 +623,10 @@ for all data to be up to date before doing anything*/
|
||||
|
||||
// This function blocks till data avilable
|
||||
get_accel_gyro_data();
|
||||
|
||||
|
||||
// Get any mag data available
|
||||
process_mag_data();
|
||||
|
||||
counter_val = timer_count();
|
||||
idle_counts = counter_val - last_counter_idle_start;
|
||||
last_counter_idle_end = counter_val;
|
||||
@ -675,7 +678,6 @@ 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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user