mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-28 13:13:34 +08:00
param: automatically update calibration ID params on import
This avoids the need for recalibration, and also cleans up other driver ID's (merge separate accel/gyro). The SPI address was previously set to a board-specific (arbitrary) value, and is now set to 0. This will allow extending for multiple sensors of the same type on the same bus.
This commit is contained in:
@@ -48,9 +48,9 @@ ISM330DLC::ISM330DLC(int bus, uint32_t device, enum Rotation rotation) :
|
||||
_px4_accel(get_device_id(), ORB_PRIO_DEFAULT, rotation),
|
||||
_px4_gyro(get_device_id(), ORB_PRIO_DEFAULT, rotation)
|
||||
{
|
||||
set_device_type(DRV_DEVTYPE_ST_ISM330DLC);
|
||||
_px4_accel.set_device_type(DRV_DEVTYPE_ST_ISM330DLC);
|
||||
_px4_gyro.set_device_type(DRV_DEVTYPE_ST_ISM330DLC);
|
||||
set_device_type(DRV_IMU_DEVTYPE_ST_ISM330DLC);
|
||||
_px4_accel.set_device_type(DRV_IMU_DEVTYPE_ST_ISM330DLC);
|
||||
_px4_gyro.set_device_type(DRV_IMU_DEVTYPE_ST_ISM330DLC);
|
||||
|
||||
_px4_accel.set_update_rate(1000000 / FIFO_INTERVAL);
|
||||
_px4_gyro.set_update_rate(1000000 / FIFO_INTERVAL);
|
||||
|
||||
Reference in New Issue
Block a user