Commit Graph

24708 Commits

Author SHA1 Message Date
Andrew Tridgell 731691ba51 PX4Firmware: submodule update 2016-11-09 17:08:10 +11:00
Andrew Tridgell 3b53caad87 AP_Compass: keep old hmc5843 ID
prevent re-use. thanks to Lucas
2016-11-09 17:08:10 +11:00
Andrew Tridgell 02c2ba1331 AP_Compass: fixed dup semaphore bug
thanks to Lucas for spotting this!
2016-11-09 17:08:10 +11:00
Andrew Tridgell f31a017ace AP_Compass: changes to HMC5843 driver
this makes the HMC5843 use single-shot mode, which makes it more
robust to bus resets. It also adds WHOAMI checking and enables
automatic temperature compensation.

Unfortunately this makes existing calibration values incompatible, so
a re-cal is required. The device ID has been changed to reflect the
driver change.
2016-11-09 17:08:10 +11:00
Andrew Tridgell f62851f780 GCS_MAVLink: added remote device operations
this makes debugging devices much easier. You can even write a
primitive SPI or I2C device driver over mavlink.

Support for this is in the devop MAVProxy module
2016-11-09 17:08:10 +11:00
Andrew Tridgell 922d5a74f7 HAL_PX4: print msg when I2C device is closed 2016-11-09 17:08:09 +11:00
Andrew Tridgell df3e434607 Copter: use handle_common_message() 2016-11-09 17:08:09 +11:00
Andrew Tridgell 90c4214a3e Tracker: use handle_common_message() 2016-11-09 17:08:09 +11:00
Andrew Tridgell 84179588a9 Rover: use handle_common_message() 2016-11-09 17:08:09 +11:00
Andrew Tridgell cb57945e9e Plane: use handle_common_message() 2016-11-09 17:08:09 +11:00
Andrew Tridgell da7ed73051 GCS_MAVLlink: added handle_common_message()
this will make it easier to add common functions for mavlink messages
without having to do a commit for each vehicle
2016-11-09 17:08:09 +11:00
Andrew Tridgell e5a4dd4e56 HAL_PX4: added perf counter on SPI devices 2016-11-09 17:08:09 +11:00
Andrew Tridgell 8bca8545a2 HAL_PX4: removed unused devname field in SPIDevice 2016-11-09 17:08:08 +11:00
Andrew Tridgell 05769640d1 AP_Compass: support rotations on AK8963 2016-11-09 17:08:08 +11:00
Andrew Tridgell 2716ab8408 AP_Compass: added support for per-instance rotations 2016-11-09 17:08:08 +11:00
Andrew Tridgell fac895b0e6 AP_Compass: setup read flag for SPI transfers 2016-11-09 17:08:08 +11:00
Andrew Tridgell 18df213069 HAL_PX4: fixed initial SPI bus speed and report new SPI instances 2016-11-09 17:08:08 +11:00
Andrew Tridgell 3d7d773883 AP_InertialSensor: added support for ICM20608 on Pixracer 2016-11-09 17:08:08 +11:00
Andrew Tridgell 4dc5dc87b5 HAL_PX4: added ICM20608 to SPI table 2016-11-09 17:08:08 +11:00
Andrew Tridgell ea74f8c12c AP_HAL: added ICM20608 INS name 2016-11-09 17:08:07 +11:00
Andrew Tridgell 2c1e9024f1 AP_InertialSensor: detect missing accels or gyros 2016-11-09 17:08:07 +11:00
Andrew Tridgell 106a91c64c AP_InertialSensor: use init_gyro() on startup
this saves the calibration parameters which should be done on
calibration
2016-11-09 17:08:07 +11:00
Andrew Tridgell 408593465f AP_InertialSensor: fixed rotation for mpu9250 on pixracer 2016-11-09 17:08:07 +11:00
Andrew Tridgell 790dd4769b AP_InertialSensor: simplify rotations for MPU9250 2016-11-09 17:08:07 +11:00
Andrew Tridgell 38a1f51b53 AP_HAL: define rotations for the MPU9250 in board/linux.h 2016-11-09 17:08:07 +11:00
Andrew Tridgell 147b253e65 AP_Compass: make device IDs match PX4 drivers
match in-tree drivers to PX4Firmware drivers
2016-11-09 17:08:06 +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 76b2759317 AP_OpticalFlow: fixed shadowed variable build warning 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
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