boards: px4/fmu-v5 disable px4io in rc.board_defaults

- avoid keeping this kind of logic in the common rcS
This commit is contained in:
Daniel Agar
2020-12-28 12:40:45 -05:00
committed by Lorenz Meier
parent a444d2610a
commit d7b89ecc86
2 changed files with 53 additions and 54 deletions
+10 -17
View File
@@ -271,19 +271,21 @@ else
param set SYS_AUTOCONFIG 0 param set SYS_AUTOCONFIG 0
fi fi
#
# Set USE_IO flag.
#
if param compare -s SYS_USE_IO 1
then
set USE_IO yes
fi
# #
# Check if PX4IO present and update firmware if needed. # Check if PX4IO present and update firmware if needed.
# Assumption IOFW set to firmware file and IO_PRESENT = no # Assumption IOFW set to firmware file and IO_PRESENT = no
# #
if [ -f $IOFW ] if [ -f $IOFW -a $USE_IO = yes ]
then then
# Check for the mini using build with px4io fw file
# but not a px4IO
if ver hwtypecmp V540 V560
then
param set SYS_USE_IO 0
else
if px4io checkcrc ${IOFW} if px4io checkcrc ${IOFW}
then then
set IO_PRESENT yes set IO_PRESENT yes
@@ -319,22 +321,13 @@ else
tune_control play -t 18 # tune 18 = PROG_PX4IO_ERR tune_control play -t 18 # tune 18 = PROG_PX4IO_ERR
fi fi
fi fi
fi
fi
#
# Set USE_IO flag.
#
if param compare -s SYS_USE_IO 1
then
set USE_IO yes
fi
if [ $USE_IO = yes -a $IO_PRESENT = no ] if [ $USE_IO = yes -a $IO_PRESENT = no ]
then then
echo "PX4IO not found" echo "PX4IO not found"
tune_control play error tune_control play error
fi fi
fi
# #
# RC update (map raw RC input to calibrate manual control) # RC update (map raw RC input to calibrate manual control)
+6
View File
@@ -9,6 +9,12 @@ then
fi fi
# disable px4io on HolyBro mini (V540) and CUAV V5nano (V560)
if ver hwtypecmp V540 V560
then
param set SYS_USE_IO 0
fi
set LOGGER_BUF 64 set LOGGER_BUF 64
rgbled_pwm start rgbled_pwm start