supports MindPXv2 borad which is a product from AirMind.

This commit is contained in:
Felix Hu
2016-03-12 12:50:14 +08:00
committed by Lorenz Meier
parent adab451013
commit bd580e09bf
49 changed files with 9941 additions and 49 deletions
+6
View File
@@ -103,6 +103,12 @@ then
set MIXER_AUX none
fi
#MindPX has not aux mixer
if ver hwcmp MINDPX_V2
then
set MIXER_AUX none
fi
if [ $MIXER_AUX != none -a $AUX_MODE != none ]
then
#
+35 -15
View File
@@ -106,32 +106,52 @@ else
then
fi
else
# FMUv1
if mpu6000 start
if ver hwcmp MINDPX_V2
then
fi
if mpu6500 start
then
fi
if l3gd20 start
then
fi
if lsm303d start
then
fi
# MAG selection
if param compare SENS_EXT_MAG 2
then
if hmc5883 -C -I start
if l3gd20 start
then
fi
# External I2C bus
if hmc5883 -C -T -X start
then
fi
else
# Use only external as primary
if param compare SENS_EXT_MAG 1
# FMUv1
if mpu6000 start
then
if hmc5883 -C -X start
fi
if l3gd20 start
then
fi
# MAG selection
if param compare SENS_EXT_MAG 2
then
if hmc5883 -C -I start
then
fi
else
# auto-detect the primary, prefer external
if hmc5883 start
# Use only external as primary
if param compare SENS_EXT_MAG 1
then
if hmc5883 -C -X start
then
fi
else
# auto-detect the primary, prefer external
if hmc5883 start
then
fi
fi
fi
fi
+84 -15
View File
@@ -114,21 +114,6 @@ then
set AUTOCNF no
fi
#
# Set USE_IO flag
#
if param compare SYS_USE_IO 1
then
if ver hwcmp PX4FMU_V4
then
set USE_IO no
else
set USE_IO yes
fi
else
set USE_IO no
fi
#
# Set default values
#
@@ -156,6 +141,35 @@ then
set EXIT_ON_END no
set MAV_TYPE none
set FAILSAFE none
set USE_IO yes
#
# Set USE_IO flag
#
if param compare SYS_USE_IO 1
then
if ver hwcmp PX4FMU_V4
then
set USE_IO no
fi
if ver hwcmp MINDPX_V2
then
set USE_IO no
fi
else
set USE_IO no
fi
# should set to 0.8 for mindpx-v2 borad.
if param compare INAV_LIDAR_ERR 0.5
then
if ver hwcmp MINDPX_V2
then
param set INAV_LIDAR_ERR 0.8
param save
fi
fi
#
# Set parameters and env variables for selected AUTOSTART
@@ -526,6 +540,49 @@ then
fi
fi
#
# MAVLink onboard / TELEM2
#
if ver hwcmp MINDPX_V2
then
else
# XXX We need a better way for runtime eval of shell variables,
# but this works for now
if param compare SYS_COMPANION 921600
then
mavlink start -d /dev/ttyS2 -b 921600 -m onboard -r 80000 -x
fi
if param compare SYS_COMPANION 57600
then
mavlink start -d /dev/ttyS2 -b 57600 -m onboard -r 5000 -x
fi
if param compare SYS_COMPANION 157600
then
mavlink start -d /dev/ttyS2 -b 57600 -m osd -r 1000
fi
if param compare SYS_COMPANION 257600
then
mavlink start -d /dev/ttyS2 -b 57600 -m magic -r 5000 -x
fi
if param compare SYS_COMPANION 357600
then
mavlink start -d /dev/ttyS2 -b 57600 -r 1000
fi
# Sensors on the PWM interface bank
# clear pins 5 and 6
if param compare SENS_EN_LL40LS 1
then
set AUX_MODE pwm4
fi
if param greater TRIG_MODE 0
then
# Get FMU driver out of the way
set MIXER_AUX none
set AUX_MODE none
camera_trigger start
fi
fi
# Transitional support: Disable safety on all Pixracer boards
if ver hwcmp PX4FMU_V4
then
@@ -801,6 +858,12 @@ fi
# XXX potentially unset all script variables.
unset TUNE_ERR
#if ver hwcmp MINDPX_V2
#then
# start sonnar
# hc_sr04 start
#fi
# Boot is complete, inform MAVLink app(s) that the system is now fully up and running
mavlink boot_complete
@@ -826,6 +889,12 @@ then
px4flow start &
fi
if ver hwcmp MINDPX_V2
then
#mindxp also need flow
px4flow start &
fi
# Start USB shell if no microSD present, MAVLink else
if [ $LOG_FILE == /dev/null ]
then