From 4240abad737f33a2fbce9d30dfd3b960910cb29d Mon Sep 17 00:00:00 2001 From: Daniel Agar <daniel@agar.ca> Date: Fri, 30 Nov 2018 14:42:51 -0500 Subject: [PATCH] move bitcraze_crazyflie init to rc.board --- ROMFS/px4fmu_common/init.d/rc.sensors | 14 ------------ ROMFS/px4fmu_common/init.d/rcS | 9 -------- boards/bitcraze/crazyflie/init/rc.board | 29 +++++++++++++++++++++++++ 3 files changed, 29 insertions(+), 23 deletions(-) create mode 100644 boards/bitcraze/crazyflie/init/rc.board diff --git a/ROMFS/px4fmu_common/init.d/rc.sensors b/ROMFS/px4fmu_common/init.d/rc.sensors index 2008a56440..85f257927c 100644 --- a/ROMFS/px4fmu_common/init.d/rc.sensors +++ b/ROMFS/px4fmu_common/init.d/rc.sensors @@ -31,20 +31,6 @@ then adc start fi -if ver hwcmp BITCRAZE_CRAZYFLIE -then - # Onboard I2C - mpu9250 -R 12 start - - # I2C bypass of mpu - lps25h start - - # Optical flow deck - vl53lxx start - pmw3901 start - -fi - if ver hwcmp ATMEL_SAME70XPLAINED_V1 then # External I2C bus diff --git a/ROMFS/px4fmu_common/init.d/rcS b/ROMFS/px4fmu_common/init.d/rcS index 7d9e0be12e..9c66bb9202 100644 --- a/ROMFS/px4fmu_common/init.d/rcS +++ b/ROMFS/px4fmu_common/init.d/rcS @@ -225,15 +225,6 @@ else sh $BOARD_RC fi - if ver hwcmp BITCRAZE_CRAZYFLIE - then - if param compare SYS_AUTOSTART 0 - then - param set SYS_AUTOSTART 4900 - set AUTOCNF yes - fi - fi - ############################################################################### # End Setup for board specific configurations. # ############################################################################### diff --git a/boards/bitcraze/crazyflie/init/rc.board b/boards/bitcraze/crazyflie/init/rc.board new file mode 100644 index 0000000000..d4dcc237f4 --- /dev/null +++ b/boards/bitcraze/crazyflie/init/rc.board @@ -0,0 +1,29 @@ +#!nsh +# +# Bitcraze Crazyflie specific board init +# +#------------------------------------------------------------------------------ +# + +if param compare SYS_AUTOSTART 0 +then + param set SYS_AUTOSTART 4900 + set AUTOCNF yes +fi + +if [ $AUTOCNF = yes ] +then + +fi + +set MIXER_AUX none + +# Onboard I2C +mpu9250 -R 12 start + +# I2C bypass of mpu +lps25h start + +# Optical flow deck +vl53lxx start +pmw3901 start -- GitLab