From 697d401b7335aa3b68c660f31024f5dcb2fc8b3a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Sch=C3=A4uble?= Date: Sat, 12 Nov 2016 12:57:33 +0100 Subject: [PATCH] Fix boot process on Pixhawk 2 (#5844) * Pixhawk2: Check for mpu9250 during boot * Fix indentation style --- ROMFS/px4fmu_common/init.d/rc.sensors | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/ROMFS/px4fmu_common/init.d/rc.sensors b/ROMFS/px4fmu_common/init.d/rc.sensors index 21276b4684..27e5fb4ee8 100644 --- a/ROMFS/px4fmu_common/init.d/rc.sensors +++ b/ROMFS/px4fmu_common/init.d/rc.sensors @@ -74,7 +74,13 @@ then then set BOARD_FMUV3 true else - set BOARD_FMUV3 false + # Check for Pixhawk 2 board + if mpu9250 -S -R 4 start + then + set BOARD_FMUV3 true + else + set BOARD_FMUV3 false + fi fi if [ $BOARD_FMUV3 == true ] @@ -92,6 +98,10 @@ then # internal MPU6000 is rotated 180 deg roll, 270 deg yaw if mpu6000 -R 14 start then + else + if mpu9250 -R 14 start + then + fi fi if hmc5883 -C -T -S -R 8 start