move airmind_mindpx-v2 init to rc.board

This commit is contained in:
Daniel Agar 2018-11-30 14:38:06 -05:00
parent c9a2033c5b
commit a3fed608a6
5 changed files with 51 additions and 47 deletions

View File

@ -51,20 +51,6 @@ then
fi
if ver hwcmp AIRMIND_MINDPX_V2
then
# External I2C bus
hmc5883 -C -T -X start
# Internal I2C bus
hmc5883 -C -T -I -R 12 start
mpu6000 -s -R 8 start
mpu9250 -s -R 8 start
lsm303d -R 10 start
l3gd20 -R 14 start
fi
if ver hwcmp ATMEL_SAME70XPLAINED_V1
then
# External I2C bus

View File

@ -461,14 +461,6 @@ else
vmount start
fi
#
# Launch the flow sensor as a background task.
#
if ver hwcmp PX4_FMU_V4 AIRMIND_MINDPX_V2
then
px4flow start &
fi
#
# Start any custom addons.
#

View File

@ -21,31 +21,6 @@ if adc start
then
fi
if ver hwcmp AIRMIND_MINDPX_V2
then
# External I2C bus
if hmc5883 -C -T -X start
then
fi
# Internal I2C bus
if hmc5883 -C -T -I -R 12 start
then
fi
if mpu9250 -s -R 8 start
then
fi
if lsm303d -R 10 start
then
fi
if l3gd20 -R 14 start
then
fi
fi
if sdp3x_airspeed start
then
fi

View File

@ -0,0 +1,49 @@
#!nsh
#
# Airmind Mindpx-v2 specific board init
#
#------------------------------------------------------------------------------
#
# UART mapping:
#
# UART1 /dev/ttyS0 wifi
# USART2 /dev/ttyS1 TELEM1 (flow control)
# USART3 /dev/ttyS2 TELEM2 (flow control)
# UART4
# UART7 CONSOLE
# UART8 /dev/ttyS6 SERIAL4/TELEM4
#
#------------------------------------------------------------------------------
#
# We know there are sketchy boards out there
# as chinese companies produce Pixracers without
# fully understanding the critical parts of the
# schematic and BOM, leading to sensor brownouts
# on boot. Original Pixracers following the
# open hardware design do not require this.
fmu sensor_reset 50
if [ $AUTOCNF = yes ]
then
# Disable safety switch by default
param set CBRK_IO_SAFETY 22027
param set SYS_FMU_TASK 1
fi
set MIXER_AUX none
# External I2C bus
hmc5883 -C -T -X start
# Internal I2C bus
hmc5883 -C -T -I -R 12 start
mpu6000 -s -R 8 start
mpu9250 -s -R 8 start
lsm303d -R 10 start
l3gd20 -R 14 start
px4flow start &

View File

@ -90,3 +90,5 @@ if param compare TEL_FRSKY_CONFIG 0
then
frsky_telemetry start -d /dev/ttyS6 -t 15
fi
px4flow start &