Commit Graph

2 Commits

Author SHA1 Message Date
Gustavo Jose de Sousa b6c0e11200 AP_InertialSensor: BMI160: convert it to use Device periodic callback
Some notes:
 - The only place that made sense to use
   suspend_timer_procs()/resume_timer_procs() calls were where we registered
   the timer process. Now there's no need for that anymore. Remove those calls
   from other place in the source too.
 - There's no need to acquire the device lock now that we are running as a
   periodic callback.
2016-09-03 01:03:07 -03:00
Gustavo Jose de Sousa ee7c40be61 AP_InertialSensor: BMI160: add backend
The reason of defining BMI160_MAX_FIFO_SAMPLES as 8 can be found on the
following histogram of the number of samples in the FIFO on each read while
performing the accelerometer calibration process:

Samples Count   Freq Acc. Freq
------------------------------
      1  3842 0.1201  0.120111
      2 13172 0.4118  0.531904
      3  9065 0.2834  0.815300
      4  2710 0.0847  0.900022
      5  2231 0.0697  0.969769
      6   816 0.0255  0.995279
      7   137 0.0043  0.999562
      8    13 0.0004  0.999969
     13     1 0.0000  1.000000
2016-07-15 16:46:06 -03:00