Renamed LIS2DW_FIFO_TIMEOUT_SECOND to LIS2DW_FIFO_TIMEOUT
This commit is contained in:
committed by
Alessandro Genova
parent
757f1a1de7
commit
e8750713f8
@@ -448,13 +448,13 @@ static void start_reading(accelerometer_data_acquisition_state_t *state) {
|
||||
|
||||
state->records[state->pos++] = record;
|
||||
lis2dw_fifo_t fifo;
|
||||
lis2dw_read_fifo(&fifo, LIS2DW_FIFO_TIMEOUT_SECOND); // dump the fifo, this starts a fresh round of data in continue_reading
|
||||
lis2dw_read_fifo(&fifo, LIS2DW_FIFO_TIMEOUT); // dump the fifo, this starts a fresh round of data in continue_reading
|
||||
}
|
||||
|
||||
static void continue_reading(accelerometer_data_acquisition_state_t *state) {
|
||||
printf("Continue reading\n");
|
||||
lis2dw_fifo_t fifo;
|
||||
lis2dw_read_fifo(&fifo, LIS2DW_FIFO_TIMEOUT_SECOND);
|
||||
lis2dw_read_fifo(&fifo, LIS2DW_FIFO_TIMEOUT);
|
||||
|
||||
fifo.count = min(fifo.count, 25); // hacky, but we need a consistent data rate; if we got a 26th data point, chuck it.
|
||||
uint8_t offset = 4 * (25 - fifo.count); // also hacky: we're sometimes short at the start. align to beginning of next second.
|
||||
|
||||
Reference in New Issue
Block a user