mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-02-18 08:54:15 +01:00
If the BMA180 isn't read when an IRQ fires (because the flash chip has claimed
the bus) then it won't fire another interrupt until read. For now this is dealt with in the sensor loop by forcing a read when the fifo is empty.
This commit is contained in:
parent
f6db859e4f
commit
f8e59443b8
@ -214,8 +214,14 @@ static void SensorsTask(void *parameters)
|
||||
count = 0;
|
||||
while((read_good = PIOS_BMA180_ReadFifo(&accel)) != 0 && !error)
|
||||
error = ((xTaskGetTickCount() - lastSysTime) > SENSOR_PERIOD) ? true : error;
|
||||
if (error)
|
||||
if (error) {
|
||||
// Unfortunately if the BMA180 ever misses getting read, then it will not
|
||||
// trigger more interrupts. In this case we must force a read to kickstarts
|
||||
// it.
|
||||
struct pios_bma180_data data;
|
||||
PIOS_BMA180_ReadAccels(&data);
|
||||
continue;
|
||||
}
|
||||
while(read_good == 0) {
|
||||
count++;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user