Commit Graph

13 Commits

Author SHA1 Message Date
murata a3f5b4f319 AP_InertialSensor: Change from magic number 0 to definition name. 2017-02-18 14:12:36 +00:00
Lucas De Marchi 5472bc4de1 Global: change Device::PeriodicCb signature
Remove bool return as it's never being used and not supported on PX4.
2017-01-14 10:03:54 +11:00
Lucas De Marchi 87c6d5da13 AP_InertialSensor: replace panic() with return
When blocking forever there's no reason to call panic later since it
will never going to be reached. This reduces binary size in a few bytes
since the message isn't required anymore.
2016-11-21 18:04:10 -02:00
Andrew Tridgell 6129b1abb6 AP_InertialSensor: wait forever for semaphore on startup
some boards take a silly amount of time to get semaphore on startup
2016-11-21 17:57:21 -02:00
Andrew Tridgell bd84e592f8 AP_InertialSensor: check for NULL device pointer in probe()
handle missing devices
2016-11-09 17:08:10 +11:00
Andrew Tridgell aa4025bdf9 AP_InertialSensor: make INS sensor IDs match for PX4
in-tree driver IDs now match PX4Firmware driver IDs on Pixhawk2
2016-11-09 17:08:06 +11:00
Andrew Tridgell 9e7e1b2f01 AP_InertialSensor: fixed merge conflicts with patches from Lucas 2016-11-09 17:08:06 +11:00
Lucas De Marchi 469efb00f6 AP_InertialSensor: save id for gyro and accel instances
This allows each sensor to be uniquely identified in the system by using
either the index inside the backend or for those that use the Device
interface, to use the bus type, location, and device id.

We leave 16-bit for each sensor to be able to change its own
identification in future, which allows them to be changed in an
incompatible manner forcing a re-calibration.
2016-11-09 17:08:05 +11:00
Gustavo Jose de Sousa 68fe536da3 AP_InertialSensor: use BMI160 for Intel Aero 2016-09-03 01:03:07 -03:00
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
José Roberto de Souza dd36952efe AP_InertialSensor: BMI160: Register poll function with the timer lock 2016-07-21 15:42:32 -03:00
Lucas De Marchi 6d1acc5813 AP_InertialSensor: BMI160: remove stray call to set speed
It's already supposed to be on high speed there.
2016-07-18 11:20:49 -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