mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-03-15 07:29:15 +01:00
OP-235 AHRS: Because of range checking at initialization the EKF can be blocked
(which is good) but that stops the comms polling. This makes it happen ocassionally but not too much. git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2335 ebee16cc-31ac-478f-84a7-5cbb03baadba
This commit is contained in:
parent
77d798071e
commit
6eae425644
@ -605,8 +605,11 @@ bool get_accel_gyro_data()
|
||||
{
|
||||
float accel[6];
|
||||
float gyro[6];
|
||||
while(fifoBuf_getUsed(&adc_fifo_buffer) < (sizeof(accel) + sizeof(gyro)))
|
||||
AhrsPoll();
|
||||
uint16_t spin_count = 1;
|
||||
while(fifoBuf_getUsed(&adc_fifo_buffer) < (sizeof(accel) + sizeof(gyro))) {
|
||||
if(spin_count++ == 0)
|
||||
AhrsPoll();
|
||||
}
|
||||
|
||||
fifoBuf_getData(&adc_fifo_buffer, &accel[0], sizeof(float) * 3);
|
||||
fifoBuf_getData(&adc_fifo_buffer, &gyro[0], sizeof(float) * 3);
|
||||
|
Loading…
x
Reference in New Issue
Block a user