From 60ade5d82b693de0593ebeb30ac492d7e672f668 Mon Sep 17 00:00:00 2001 From: Daniel Agar <daniel@agar.ca> Date: Fri, 30 Nov 2018 14:19:26 -0500 Subject: [PATCH] move av_x1-v1 init to rc.board --- ROMFS/px4fmu_common/init.d/rc.logging | 9 -------- ROMFS/px4fmu_common/init.d/rc.mavlink | 9 -------- ROMFS/px4fmu_common/init.d/rc.sensors | 14 ------------ boards/av/x-v1/init/rc.board | 31 +++++++++++++++++++++++++++ 4 files changed, 31 insertions(+), 32 deletions(-) create mode 100644 boards/av/x-v1/init/rc.board diff --git a/ROMFS/px4fmu_common/init.d/rc.logging b/ROMFS/px4fmu_common/init.d/rc.logging index f9b34b30cc..1e4c2e7716 100644 --- a/ROMFS/px4fmu_common/init.d/rc.logging +++ b/ROMFS/px4fmu_common/init.d/rc.logging @@ -12,15 +12,6 @@ then set LOGGER_BUF 6 fi -############################################################################### -# Begin Setup for board specific configurations. # -############################################################################### - -if ver hwcmp AV_X_V1 -then - set LOGGER_BUF 64 -fi - ############################################################################### # End Setup for board specific configurations. # ############################################################################### diff --git a/ROMFS/px4fmu_common/init.d/rc.mavlink b/ROMFS/px4fmu_common/init.d/rc.mavlink index 5552edcf75..a7c077a1a3 100644 --- a/ROMFS/px4fmu_common/init.d/rc.mavlink +++ b/ROMFS/px4fmu_common/init.d/rc.mavlink @@ -11,15 +11,6 @@ then mavlink start -r 800000 -d /dev/ttyACM0 -m config -x fi -if ver hwcmp AV_X_V1 -then - # AV-X: start MAVLink to companion (connected to TX2) - mavlink start -d /dev/ttyS5 -r 20000 -b 460800 -m onboard - - # AV-X: start MAVLink UDP port 14570 - mavlink start -x -u 14570 -fi - # # SYS_COMPANION transition support. Can be removed after the next release (currently at 1.8.0) # diff --git a/ROMFS/px4fmu_common/init.d/rc.sensors b/ROMFS/px4fmu_common/init.d/rc.sensors index 06487f04a5..ecfe204a96 100644 --- a/ROMFS/px4fmu_common/init.d/rc.sensors +++ b/ROMFS/px4fmu_common/init.d/rc.sensors @@ -66,20 +66,6 @@ then mpu9250 -R 2 start fi -if ver hwcmp AV_X_V1 -then - adis16477 -R 8 start - - #adis16497 start - - lps22hb -S start - - lsm303agr -R 4 start - - ms4525_airspeed -T 4515 -b 3 start - -fi - if ver hwcmp BITCRAZE_CRAZYFLIE then # Onboard I2C diff --git a/boards/av/x-v1/init/rc.board b/boards/av/x-v1/init/rc.board new file mode 100644 index 0000000000..db9b00ba6e --- /dev/null +++ b/boards/av/x-v1/init/rc.board @@ -0,0 +1,31 @@ +#!nsh +# +# av_x1-v1 specific board init +# +# + +if [ $AUTOCNF = yes ] +then + param set SYS_FMU_TASK 1 +fi + +set LOGGER_BUF 64 +set MIXER_AUX none + + +adis16477 -R 8 start + +#adis16497 start + +lps22hb -S start + +lsm303agr -R 4 start + +ms4525_airspeed -T 4515 -b 3 start + + +# AV-X: start MAVLink to companion (connected to TX2) +mavlink start -d /dev/ttyS5 -r 20000 -b 460800 -m onboard + +# AV-X: start MAVLink UDP port 14570 +mavlink start -x -u 14570 -- GitLab