diff --git a/ROMFS/px4fmu_common/init.d/rc.sensors b/ROMFS/px4fmu_common/init.d/rc.sensors index 0c75b8eb74..b6f9e4af4d 100644 --- a/ROMFS/px4fmu_common/init.d/rc.sensors +++ b/ROMFS/px4fmu_common/init.d/rc.sensors @@ -270,7 +270,11 @@ then then fi - if hmc5883 -R 4 start + if hmc5883 -I -R 4 start + then + fi + + if hmc5883 -X start then fi fi diff --git a/nuttx-configs/aerofc-v1/include/board.h b/nuttx-configs/aerofc-v1/include/board.h index d4473e9555..bb5b77340e 100644 --- a/nuttx-configs/aerofc-v1/include/board.h +++ b/nuttx-configs/aerofc-v1/include/board.h @@ -255,6 +255,11 @@ * reset the bus to clear stuck slaves. They match the pin configuration, * but are normally-high GPIOs. */ +#define GPIO_I2C1_SDA GPIO_I2C1_SDA_2 +#define GPIO_I2C1_SCL GPIO_I2C1_SCL_2 +#define GPIO_I2C1_SDA_GPIO (GPIO_OUTPUT|GPIO_OPENDRAIN|GPIO_SPEED_50MHz|GPIO_OUTPUT_SET|GPIO_PORTB|GPIO_PIN9) +#define GPIO_I2C1_SCL_GPIO (GPIO_OUTPUT|GPIO_OPENDRAIN|GPIO_SPEED_50MHz|GPIO_OUTPUT_SET|GPIO_PORTB|GPIO_PIN8) + #define GPIO_I2C3_SDA GPIO_I2C3_SDA_1 #define GPIO_I2C3_SCL GPIO_I2C3_SCL_1 #define GPIO_I2C3_SDA_GPIO (GPIO_OUTPUT|GPIO_OPENDRAIN|GPIO_SPEED_50MHz|GPIO_OUTPUT_SET|GPIO_PORTC|GPIO_PIN9) diff --git a/src/drivers/boards/aerofc-v1/board_config.h b/src/drivers/boards/aerofc-v1/board_config.h index f429b57fc6..3f47284cec 100644 --- a/src/drivers/boards/aerofc-v1/board_config.h +++ b/src/drivers/boards/aerofc-v1/board_config.h @@ -87,7 +87,8 @@ * I2C3_SDL PA8 COMPASS_I2C3_SCL JP1-25,26 * */ -#define PX4_I2C_BUS_ONBOARD 3 +#define PX4_I2C_BUS_EXPANSION 1 +#define PX4_I2C_BUS_ONBOARD 3 #define PX4_I2C_OBDEV_HMC5883 0x1E