diff --git a/libraries/AP_HAL_ChibiOS/hwdef/CubeBlack/hwdef.dat b/libraries/AP_HAL_ChibiOS/hwdef/CubeBlack/hwdef.dat index 490528c84c..90215e220d 100644 --- a/libraries/AP_HAL_ChibiOS/hwdef/CubeBlack/hwdef.dat +++ b/libraries/AP_HAL_ChibiOS/hwdef/CubeBlack/hwdef.dat @@ -23,3 +23,35 @@ PB1 PB1_ADC ADC1 SCALE(1) SPIDEV icm20948_ext SPI4 DEVID1 MPU_EXT_CS MODE3 4*MHZ 8*MHZ SPIDEV icm20602_ext SPI4 DEVID3 GYRO_EXT_CS MODE3 4*MHZ 8*MHZ + +# three IMUs, but allow for different varients. First two IMUs are +# isolated, 3rd isn't +IMU Invensense SPI:mpu9250_ext ROTATION_PITCH_180 + +# the 3 rotations for the LSM9DS0 driver are for the accel, the gyro +# and the H varient of the gyro +IMU LSM9DS0 SPI:lsm9ds0_ext_g SPI:lsm9ds0_ext_am ROTATION_ROLL_180_YAW_270 ROTATION_ROLL_180_YAW_90 ROTATION_ROLL_180_YAW_90 + +# 3rd non-isolated IMU +IMU Invensense SPI:mpu9250 ROTATION_YAW_270 + +# alternative IMU set for newer cubes +IMU Invensense SPI:icm20602_ext ROTATION_ROLL_180_YAW_270 +IMU Invensensev2 SPI:icm20948_ext ROTATION_PITCH_180 +IMU Invensensev2 SPI:icm20948 ROTATION_YAW_270 +define HAL_DEFAULT_INS_FAST_SAMPLE 1 + +# two baros +BARO MS56XX SPI:ms5611_ext +BARO MS56XX SPI:ms5611 + +# two compasses. First is in the LSM303D +COMPASS LSM303D SPI:lsm9ds0_ext_am ROTATION_YAW_270 +# 2nd compass is part of the 2nd invensense IMU +COMPASS AK8963:probe_mpu9250 1 ROTATION_YAW_270 + +# compass as part of ICM20948 on newer cubes +COMPASS AK09916:probe_ICM20948 0 ROTATION_ROLL_180_YAW_90 + +# also probe for external compasses +define HAL_PROBE_EXTERNAL_I2C_COMPASSES diff --git a/libraries/AP_HAL_ChibiOS/hwdef/CubeOrange/hwdef.dat b/libraries/AP_HAL_ChibiOS/hwdef/CubeOrange/hwdef.dat index e8a67030b4..99c7c7da17 100644 --- a/libraries/AP_HAL_ChibiOS/hwdef/CubeOrange/hwdef.dat +++ b/libraries/AP_HAL_ChibiOS/hwdef/CubeOrange/hwdef.dat @@ -232,6 +232,39 @@ SPIDEV external0m2 SPI4 DEVID5 MPU_EXT_CS MODE2 2*MHZ 2*MHZ SPIDEV external0m3 SPI4 DEVID5 MPU_EXT_CS MODE3 2*MHZ 2*MHZ SPIDEV pixartPC15 SPI4 DEVID13 ACCEL_EXT_CS MODE3 2*MHZ 2*MHZ +# three IMUs, but allow for different varients. First two IMUs are +# isolated, 3rd isn't +IMU Invensense SPI:mpu9250_ext ROTATION_PITCH_180 + +# the 3 rotations for the LSM9DS0 driver are for the accel, the gyro +# and the H varient of the gyro +IMU LSM9DS0 SPI:lsm9ds0_ext_g SPI:lsm9ds0_ext_am ROTATION_ROLL_180_YAW_270 ROTATION_ROLL_180_YAW_90 ROTATION_ROLL_180_YAW_90 + +# 3rd non-isolated IMU +IMU Invensense SPI:mpu9250 ROTATION_YAW_270 + +# alternative IMU set for newer cubes +IMU Invensense SPI:icm20602_ext ROTATION_ROLL_180_YAW_270 +IMU Invensensev2 SPI:icm20948_ext ROTATION_PITCH_180 +IMU Invensensev2 SPI:icm20948 ROTATION_YAW_270 + +define HAL_DEFAULT_INS_FAST_SAMPLE 1 + +# two baros +BARO MS56XX SPI:ms5611_ext +BARO MS56XX SPI:ms5611 + +# two compasses. First is in the LSM303D +COMPASS LSM303D SPI:lsm9ds0_ext_am ROTATION_YAW_270 +# 2nd compass is part of the 2nd invensense IMU +COMPASS AK8963:probe_mpu9250 1 ROTATION_YAW_270 + +# compass as part of ICM20948 on newer cubes +COMPASS AK09916:probe_ICM20948 0 ROTATION_ROLL_180_YAW_90 + +# also probe for external compasses +define HAL_PROBE_EXTERNAL_I2C_COMPASSES + define HAL_CHIBIOS_ARCH_FMUV3 1 define BOARD_TYPE_DEFAULT 3 diff --git a/libraries/AP_HAL_ChibiOS/hwdef/CubePurple/hwdef.dat b/libraries/AP_HAL_ChibiOS/hwdef/CubePurple/hwdef.dat index 7fb22019ec..638d841ef1 100644 --- a/libraries/AP_HAL_ChibiOS/hwdef/CubePurple/hwdef.dat +++ b/libraries/AP_HAL_ChibiOS/hwdef/CubePurple/hwdef.dat @@ -16,3 +16,20 @@ undef PB0 undef PB1 PB0 PB0_ADC ADC1 SCALE(1) PB1 PB1_ADC ADC1 SCALE(1) + +# one non-isolated IMU +IMU Invensense SPI:mpu9250 ROTATION_YAW_270 + +# alterative newer IMU +IMU Invensensev2 SPI:icm20948 ROTATION_YAW_270 + +define HAL_DEFAULT_INS_FAST_SAMPLE 1 + +# one baros +BARO MS56XX SPI:ms5611 + +# compass as part of the ICM20948 +COMPASS AK09916:probe_ICM20948 0 ROTATION_ROLL_180_YAW_90 + +# also probe for external compasses +define HAL_PROBE_EXTERNAL_I2C_COMPASSES diff --git a/libraries/AP_HAL_ChibiOS/hwdef/CubeSolo/hwdef.dat b/libraries/AP_HAL_ChibiOS/hwdef/CubeSolo/hwdef.dat index 4a6ed7ca63..764dfee053 100644 --- a/libraries/AP_HAL_ChibiOS/hwdef/CubeSolo/hwdef.dat +++ b/libraries/AP_HAL_ChibiOS/hwdef/CubeSolo/hwdef.dat @@ -13,3 +13,36 @@ SPIDEV icm20602_ext SPI4 DEVID3 GYRO_EXT_CS MODE3 4*MHZ 8*MHZ # pull Solo's default parameters from /Tools/Frame_params # these are parameters the Solo requires for proper operation that are differnet from the 3.7 standard defaults. env DEFAULT_PARAMETERS 'Tools/Frame_params/Solo_Copter-3.7_BlackCube.param' + +# three IMUs, but allow for different varients. First two IMUs are +# isolated, 3rd isn't +IMU Invensense SPI:mpu9250_ext ROTATION_PITCH_180 + +# the 3 rotations for the LSM9DS0 driver are for the accel, the gyro +# and the H varient of the gyro +IMU LSM9DS0 SPI:lsm9ds0_ext_g SPI:lsm9ds0_ext_am ROTATION_ROLL_180_YAW_270 ROTATION_ROLL_180_YAW_90 ROTATION_ROLL_180_YAW_90 + +# 3rd non-isolated IMU +IMU Invensense SPI:mpu9250 ROTATION_YAW_270 + +# alternative IMU set for newer cubes +IMU Invensense SPI:icm20602_ext ROTATION_ROLL_180_YAW_270 +IMU Invensensev2 SPI:icm20948_ext ROTATION_PITCH_180 +IMU Invensensev2 SPI:icm20948 ROTATION_YAW_270 + +define HAL_DEFAULT_INS_FAST_SAMPLE 1 + +# two baros +BARO MS56XX SPI:ms5611_ext +BARO MS56XX SPI:ms5611 + +# two compasses. First is in the LSM303D +COMPASS LSM303D SPI:lsm9ds0_ext_am ROTATION_YAW_270 +# 2nd compass is part of the 2nd invensense IMU +COMPASS AK8963:probe_mpu9250 1 ROTATION_YAW_270 + +# compass as part of ICM20948 on newer cubes +COMPASS AK09916:probe_ICM20948 0 ROTATION_ROLL_180_YAW_90 + +# also probe for external compasses +define HAL_PROBE_EXTERNAL_I2C_COMPASSES diff --git a/libraries/AP_HAL_ChibiOS/hwdef/CubeYellow/hwdef.dat b/libraries/AP_HAL_ChibiOS/hwdef/CubeYellow/hwdef.dat index 30adc8b0ed..2dd1cc1be0 100644 --- a/libraries/AP_HAL_ChibiOS/hwdef/CubeYellow/hwdef.dat +++ b/libraries/AP_HAL_ChibiOS/hwdef/CubeYellow/hwdef.dat @@ -395,6 +395,39 @@ SPIDEV pixartPC15 SPI4 DEVID13 ACCEL_EXT_CS MODE3 2*MHZ 2*MHZ #SPIDEV clock8 SPI4 DEVID5 MPU_EXT_CS MODE0 8*MHZ 8*MHZ # gives 5.5MHz #SPIDEV clock16 SPI4 DEVID5 MPU_EXT_CS MODE0 16*MHZ 16*MHZ # gives 10.6MHz +# three IMUs, but allow for different varients. First two IMUs are +# isolated, 3rd isn't +IMU Invensense SPI:mpu9250_ext ROTATION_PITCH_180 + +# the 3 rotations for the LSM9DS0 driver are for the accel, the gyro +# and the H varient of the gyro +IMU LSM9DS0 SPI:lsm9ds0_ext_g SPI:lsm9ds0_ext_am ROTATION_ROLL_180_YAW_270 ROTATION_ROLL_180_YAW_90 ROTATION_ROLL_180_YAW_90 + +# 3rd non-isolated IMU +IMU Invensense SPI:mpu9250 ROTATION_YAW_270 + +# alternative IMU set for newer cubes +IMU Invensense SPI:icm20602_ext ROTATION_ROLL_180_YAW_270 +IMU Invensensev2 SPI:icm20948_ext ROTATION_PITCH_180 +IMU Invensensev2 SPI:icm20948 ROTATION_YAW_270 + +define HAL_DEFAULT_INS_FAST_SAMPLE 1 + +# two baros +BARO MS56XX SPI:ms5611_ext +BARO MS56XX SPI:ms5611 + +# two compasses. First is in the LSM303D +COMPASS LSM303D SPI:lsm9ds0_ext_am ROTATION_YAW_270 +# 2nd compass is part of the 2nd invensense IMU +COMPASS AK8963:probe_mpu9250 1 ROTATION_YAW_270 + +# compass as part of ICM20948 on newer cubes +COMPASS AK09916:probe_ICM20948 0 ROTATION_ROLL_180_YAW_90 + +# also probe for external compasses +define HAL_PROBE_EXTERNAL_I2C_COMPASSES + # this adds a C define which sets up the ArduPilot architecture # define. Any line starting with 'define' is copied literally as # a #define in the hwdef.h header