Browse Source

move fmu-v4pro init to rc.board

sbg
Daniel Agar 6 years ago
parent
commit
6c2436c2ca
  1. 21
      ROMFS/px4fmu_common/init.d/rc.sensors
  2. 12
      ROMFS/px4fmu_common/init.d/rcS
  3. 46
      boards/px4/fmu-v4pro/init/rc.board

21
ROMFS/px4fmu_common/init.d/rc.sensors

@ -244,27 +244,6 @@ then @@ -244,27 +244,6 @@ then
fi
fi
if ver hwcmp PX4_FMU_V4PRO
then
# Internal SPI bus ICM-20608-G
mpu6000 -R 2 -T 20608 start
# Internal SPI bus ICM-20602
mpu6000 -R 2 -T 20602 start
# Internal SPI bus mpu9250
mpu9250 -R 2 start
# Internal SPI bus
lis3mdl -R 0 start
# Possible external compasses
hmc5883 -C -T -X start
#RM3100
rm3100 start
fi
if ver hwcmp ATMEL_SAME70XPLAINED_V1
then
# External I2C bus

12
ROMFS/px4fmu_common/init.d/rcS

@ -15,10 +15,9 @@ set +e @@ -15,10 +15,9 @@ set +e
#
#------------------------------------------------------------------------------
#
# UART mapping on FMUv2/3/4:
# UART mapping on FMUv2/3:
#
# UART1 /dev/ttyS0 IO debug (except v4, there ttyS0 is the wifi,
# v4pro: TELEM3)
# UART1 /dev/ttyS0 IO debug
# USART2 /dev/ttyS1 TELEM1 (flow control)
# USART3 /dev/ttyS2 TELEM2 (flow control)
# UART4
@ -338,11 +337,6 @@ else @@ -338,11 +337,6 @@ else
#
if [ $AUTOCNF = yes ]
then
# Run FMU as task on Pixracer and on boards with enough RAM.
if ver hwcmp PX4_FMU_V4PRO PX4_FMU_V5
then
param set SYS_FMU_TASK 1
fi
# Disable safety switch by default on OmnibusF4SD.
if ver hwcmp OMNIBUS_F4SD
@ -555,7 +549,7 @@ else @@ -555,7 +549,7 @@ else
#
# Launch the flow sensor as a background task.
#
if ver hwcmp PX4_FMU_V2 PX4_FMU_V4 PX4_FMU_V4PRO AIRMIND_MINDPX_V2 OMNIBUS_F4SD
if ver hwcmp PX4_FMU_V2 PX4_FMU_V4 AIRMIND_MINDPX_V2 OMNIBUS_F4SD
then
px4flow start &
fi

46
boards/px4/fmu-v4pro/init/rc.board

@ -0,0 +1,46 @@ @@ -0,0 +1,46 @@
#!nsh
#
# PX4 FMUv4pro specific board init
#
#------------------------------------------------------------------------------
#
# UART mapping on FMUv4pro:
#
# UART1 /dev/ttyS0 TELEM3
# 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-20608-G
mpu6000 -R 2 -T 20608 start
# Internal SPI bus ICM-20602
mpu6000 -R 2 -T 20602 start
# Internal SPI bus mpu9250
mpu9250 -R 2 start
# Internal SPI bus
lis3mdl -R 0 start
# Possible external compasses
hmc5883 -C -T -X start
# RM3100
rm3100 start
px4flow start &
Loading…
Cancel
Save