create board specific init script and use with fmu-v5

This commit is contained in:
Daniel Agar
2018-11-30 13:46:41 -05:00
parent 94d4f0391a
commit 25799c6e75
5 changed files with 80 additions and 45 deletions

View File

@@ -0,0 +1,52 @@
#!nsh
#
# PX4 FMUv5 specific board init
#
#------------------------------------------------------------------------------
#
# UART mapping on FMUv5:
#
# UART1 /dev/ttyS0 GPS
# USART2 /dev/ttyS1 TELEM1 (flow control)
# USART3 /dev/ttyS2 TELEM2 (flow control)
# UART4 /dev/ttyS3 TELEM4
# USART6 /dev/ttyS4 TELEM3 (flow control)
# UART7 /dev/ttyS5
# UART8 /dev/ttyS6 CONSOLE
#
#------------------------------------------------------------------------------
#
if [ $AUTOCNF = yes ]
then
param set SYS_FMU_TASK 1
fi
set LOGGER_BUF 64
# Internal SPI bus ICM-20602
mpu6000 -R 8 -s -T 20602 start
# Internal SPI bus ICM-20689
mpu6000 -R 8 -z -T 20689 start
# Internal SPI bus BMI055 accel
bmi055 -A -R 10 start
# Internal SPI bus BMI055 gyro
bmi055 -G -R 10 start
# Possible external compasses
hmc5883 -C -T -X start
# Possible external compasses
ist8310 -C -b 1 start
ist8310 -C -b 2 start
# Possible internal compass
ist8310 -C -b 5 start
# Possible pmw3901 optical flow sensor
pmw3901 start
px4flow start &