Andrew Tridgell
9e7e1b2f01
AP_InertialSensor: fixed merge conflicts with patches from Lucas
2016-11-09 17:08:06 +11:00
Andrew Tridgell
1990aa96e1
AP_HAL: added get_bus_id_devtype()
...
used to do versioning on device types
2016-11-09 17:08:06 +11:00
Lucas De Marchi
104e29acf2
AP_InertialSensor: MPU6000: change accel scale to 16G
...
Also change the ID of MPU6000 so previous calibration values are not
considered valid.
2016-11-09 17:08:06 +11:00
Lucas De Marchi
dc09661b9e
AP_InertialSensor: MPU6000: save driver version
...
When registering accel and gyro we use the upper 16bits of the id to
store the driver version. When changing the driver behavior in
non-compatible ways, changing this version will trigger a request for
calibration.
2016-11-09 17:08:06 +11:00
Lucas De Marchi
0d3adef8b2
AP_InertialSensor: MPU6000: remove TODO leftover
...
This will never be done as blindly changing speed is not the way to fix
communication issues.
2016-11-09 17:08:05 +11:00
Andrew Tridgell
0a1616cc71
AP_InertialSensor: use correct device IDs on PX4 driver
2016-11-09 17:08:05 +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
Lucas De Marchi
bbb9bfa95e
AP_InertialSensor: save only gyro calibration
...
When we are initializing the gyro and then saving the calibration we are
also saving the calibration values for the accelerometers. Right now
this is non-problematic, but we want to check that the ID of the
accelerometer corresponds to the ID of the sensor detected. If we also
save accel calibrations we would actually override the ID of the
accelerometer.
Rename the method to _save_gyro_calibration() and save only on gyro
values.
2016-11-09 17:08:05 +11:00
Lucas De Marchi
f81dba2100
AP_InertialSensor: add doc to get_id() of backend
...
This is different from get_id() of Device and ultimately from each
sensor this this is identifying the backend, not the sensor.
2016-11-09 17:08:05 +11:00
Lucas De Marchi
6b88f3367b
AP_Common: remove AP_PRODUCT_ID_* macros
...
These are not used anymore.
2016-11-09 17:08:05 +11:00
Lucas De Marchi
ace61087a1
AP_InertialSensor: remove product_id
...
We only leave the parameter there for backward-compatibility. However
product id on the inertial sensor is not much useful since it's only
kept for the first instance.
A better implementation per-gyro and per-accel is needed in order to
avoid problems with sensors taking the offsets configured for another
sensor.
2016-11-09 17:08:05 +11:00
Andrew Tridgell
a6ac02b61f
HAL_Linux: implement device IDs for I2C and SPI
2016-11-09 17:08:04 +11:00
Andrew Tridgell
de7913e8e9
AP_Compass: implement device IDs for compass drivers
2016-11-09 17:08:04 +11:00
Andrew Tridgell
64a5d3938c
AP_InertialSensor: implement device IDs for MPU6000 and MPU9250 AuxilaryBus
2016-11-09 17:08:04 +11:00
Andrew Tridgell
ac2c25539b
AP_InertialSensor: implement device IDs for AuxilaryBus
2016-11-09 17:08:04 +11:00
Andrew Tridgell
16489d2a13
HAL_PX4: implement device IDs for I2C and SPI
2016-11-09 17:08:04 +11:00
Andrew Tridgell
3d48b6bb3a
AP_HAL: added device id tuples to Device class
...
this allows a bus connection and device type tuple to be identifed as
a 24 bit number for use in user visible device IDs. Every bus
connection has a unique device ID.
2016-11-09 17:08:04 +11:00
Andrew Tridgell
4ef92b5e39
AP_InertialSensor: enable all 3 IMUs on PH2
2016-11-09 17:08:04 +11:00
Andrew Tridgell
e08babb7df
HAL_PX4: added new SPI devices for PH2
2016-11-09 17:08:03 +11:00
Andrew Tridgell
26ca2dd392
AP_HAL: added more px4 SPI device names
2016-11-09 17:08:03 +11:00
Andrew Tridgell
ac0ea12b42
AP_Compass: enable HMC5843 on SPI for PH2
2016-11-09 17:08:03 +11:00
Andrew Tridgell
88e24dd8bd
AP_BoardConfig: added board type 103
...
for PH2 in-tree drivers
2016-11-09 17:08:03 +11:00
Andrew Tridgell
66026100c3
AP_Baro: enable dual baro on PH2
2016-11-09 17:08:03 +11:00
Andrew Tridgell
4df9b093c3
AP_Baro: fixed missed samples in ms5611 driver
2016-11-09 17:08:03 +11:00
Andrew Tridgell
7c36e14524
AP_ADC: fixed thread usage in AP_ADC_ADS1115
2016-11-09 17:08:03 +11:00
Andrew Tridgell
dbd192971f
AP_Notify: fixed threading on toshibaled i2c
2016-11-09 17:08:02 +11:00
Andrew Tridgell
a9cb03ad74
AP_Notify: fixed threading in two notify backends
2016-11-09 17:08:02 +11:00
Andrew Tridgell
6e2fbf1988
AP_OpticalFlow: fixed threading in opticalflow for linux
2016-11-09 17:08:02 +11:00
Andrew Tridgell
5cf768ced2
AP_InertialSensor: fixed missing return
2016-11-09 17:08:02 +11:00
Andrew Tridgell
4f231f9355
AP_BattMonitor: fixed thread usage for SMBus_I2C
2016-11-09 17:08:02 +11:00
Andrew Tridgell
e88519364f
AP_RangeFinder: fixed maxbotix I2C semaphore and bus usage
2016-11-09 17:08:02 +11:00
Andrew Tridgell
bedee31f61
AP_Baro: fixed semaphore and thread usage in baro drivers
2016-11-09 17:08:02 +11:00
Andrew Tridgell
38ff8b3536
AP_InertialSensor: removed unused product_id function in L3G4200D
2016-11-09 17:08:01 +11:00
Andrew Tridgell
1c631ea037
AP_Compass: cleanup use of backend semaphores
...
fixed drivers that didn't protect accumulation counters
2016-11-09 17:08:01 +11:00
Andrew Tridgell
9afd51350e
AP_Compass: use thread per bus in more drivers
...
and removed use of timer suspend
2016-11-09 17:08:01 +11:00
Andrew Tridgell
974827aa82
AP_Compass: enabled AK8963 on PX4
2016-11-09 17:08:01 +11:00
Andrew Tridgell
a06137bb68
AP_HAL: define 9250 devices
2016-11-09 17:08:01 +11:00
Andrew Tridgell
4bc5b715bf
HAL_PX4: define 9250 and fix SPI bus speeds
2016-11-09 17:08:01 +11:00
Andrew Tridgell
a5c5e033d2
AP_InertialSensor: fixed threading and locking in remaining backends
...
use a backend semaphore for shared data and use thread per bus where
available
2016-11-09 17:08:01 +11:00
Andrew Tridgell
2e4151d14e
AP_Compass: enable lsm303d mag on FMUv2
2016-11-09 17:08:00 +11:00
Andrew Tridgell
36190ba545
AP_Compass: use thread per bus for lsm303d mag
2016-11-09 17:08:00 +11:00
Andrew Tridgell
b92c48548a
AP_InertialSensor: added per-instance rotation for LSM9DS0
2016-11-09 17:08:00 +11:00
Andrew Tridgell
2df6ed08c2
AP_InertialSensor: added optional per-instance orientation
...
this is needed for multi-sensor boards to get orientation right for
each sensor
2016-11-09 17:08:00 +11:00
Andrew Tridgell
ac2572384d
AP_InertialSensor: added start() method for LSM9DS0
...
needed to get sensor ordering right on multi-sensor boards
2016-11-09 17:08:00 +11:00
Andrew Tridgell
b9e1490740
AP_BoardConfig: added px4io auto-update to AP_BoardConfig
2016-11-09 17:08:00 +11:00
Andrew Tridgell
7e803df221
AP_BoardConfig: startup core peripherals for PX4
2016-11-09 17:07:59 +11:00
Andrew Tridgell
84f93439ca
HAL_PX4: delay peripheral starup
...
moved to AP_BoardConfig
2016-11-09 17:07:59 +11:00
Andrew Tridgell
95de899229
mk: removed more drivers from rc.APM
2016-11-09 17:07:59 +11:00
Andrew Tridgell
497b87fa65
AP_Airspeed: switched to in-tree I2C driver for all boards
2016-11-09 17:07:59 +11:00
Andrew Tridgell
af947dbd38
mk: removed PX4 airspeed drivers
2016-11-09 17:07:59 +11:00