From e45b862f1d372beb38b1cefce6664f74a6a06f92 Mon Sep 17 00:00:00 2001 From: Jaeyoung-Lim Date: Mon, 28 Jun 2021 12:09:38 +0200 Subject: [PATCH] Specify orientaiton of ADIS16448 IMU from rc.sensors Specify orientaiton of ADIS16448 IMU for from the rc.sensors WIP: Currently only handling one orientation --- ROMFS/px4fmu_common/init.d/rc.sensors | 9 ++++++++- .../imu/analog_devices/adis16448/parameters.c | 12 ++++++++++++ 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/ROMFS/px4fmu_common/init.d/rc.sensors b/ROMFS/px4fmu_common/init.d/rc.sensors index ace0571afc..f718d02d75 100644 --- a/ROMFS/px4fmu_common/init.d/rc.sensors +++ b/ROMFS/px4fmu_common/init.d/rc.sensors @@ -117,7 +117,14 @@ fi # ADIS16448 spi external IMU if param compare -s SENS_EN_ADIS164X 1 then - adis16448 -S start + if param compare -s SENS_OR_ADIS164X 0 + then + adis16448 -S start + fi + if param compare -s SENS_OR_ADIS164X 4 + then + adis16448 -S start -R 4 + fi fi # probe for optional external I2C devices diff --git a/src/drivers/imu/analog_devices/adis16448/parameters.c b/src/drivers/imu/analog_devices/adis16448/parameters.c index 9b44b9e2c4..9b33736092 100644 --- a/src/drivers/imu/analog_devices/adis16448/parameters.c +++ b/src/drivers/imu/analog_devices/adis16448/parameters.c @@ -42,3 +42,15 @@ * @value 1 Enabled */ PARAM_DEFINE_INT32(SENS_EN_ADIS164X, 0); + +/** + * Analog Devices ADIS16448 IMU Orientation(external SPI) + * + * @reboot_required true + * @min 0 + * @max 101 + * @group Sensors + * @value 0 ROTATION_NONE + * @value 4 ROTATION_YAW_180 + */ +PARAM_DEFINE_INT32(SENS_OR_ADIS164X, 0);