mirror of
https://gitee.com/xiaohuolufeihua/bizhang_-obav.git
synced 2026-05-22 01:12:31 +00:00
Revert "boards: px4/fmu-v5 disable px4io in rc.board_defaults"
This reverts commit d7b89ecc86.
This commit is contained in:
@@ -271,6 +271,57 @@ else
|
|||||||
param set SYS_AUTOCONFIG 0
|
param set SYS_AUTOCONFIG 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
#
|
||||||
|
# Check if PX4IO present and update firmware if needed.
|
||||||
|
# Assumption IOFW set to firmware file and IO_PRESENT = no
|
||||||
|
#
|
||||||
|
|
||||||
|
if [ -f $IOFW ]
|
||||||
|
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}
|
||||||
|
then
|
||||||
|
set IO_PRESENT yes
|
||||||
|
else
|
||||||
|
# tune Program PX4IO
|
||||||
|
tune_control play -t 16 # tune 16 = PROG_PX4IO
|
||||||
|
|
||||||
|
if px4io start
|
||||||
|
then
|
||||||
|
# Try to safety px4 io so motor outputs don't go crazy.
|
||||||
|
if ! px4io safety_on
|
||||||
|
then
|
||||||
|
# px4io did not respond to the safety command.
|
||||||
|
px4io stop
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if px4io forceupdate 14662 ${IOFW}
|
||||||
|
then
|
||||||
|
usleep 10000
|
||||||
|
tune_control stop
|
||||||
|
if px4io checkcrc ${IOFW}
|
||||||
|
then
|
||||||
|
echo "PX4IO CRC OK after updating"
|
||||||
|
tune_control play -t 17 # tune 17 = PROG_PX4IO_OK
|
||||||
|
set IO_PRESENT yes
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ $IO_PRESENT = no ]
|
||||||
|
then
|
||||||
|
echo "PX4IO update failed"
|
||||||
|
tune_control play -t 18 # tune 18 = PROG_PX4IO_ERR
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
#
|
#
|
||||||
# Set USE_IO flag.
|
# Set USE_IO flag.
|
||||||
#
|
#
|
||||||
@@ -279,54 +330,10 @@ else
|
|||||||
set USE_IO yes
|
set USE_IO yes
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#
|
if [ $USE_IO = yes -a $IO_PRESENT = no ]
|
||||||
# Check if PX4IO present and update firmware if needed.
|
|
||||||
# Assumption IOFW set to firmware file and IO_PRESENT = no
|
|
||||||
#
|
|
||||||
|
|
||||||
if [ -f $IOFW -a $USE_IO = yes ]
|
|
||||||
then
|
then
|
||||||
if px4io checkcrc ${IOFW}
|
echo "PX4IO not found"
|
||||||
then
|
tune_control play error
|
||||||
set IO_PRESENT yes
|
|
||||||
else
|
|
||||||
# tune Program PX4IO
|
|
||||||
tune_control play -t 16 # tune 16 = PROG_PX4IO
|
|
||||||
|
|
||||||
if px4io start
|
|
||||||
then
|
|
||||||
# Try to safety px4 io so motor outputs don't go crazy.
|
|
||||||
if ! px4io safety_on
|
|
||||||
then
|
|
||||||
# px4io did not respond to the safety command.
|
|
||||||
px4io stop
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
if px4io forceupdate 14662 ${IOFW}
|
|
||||||
then
|
|
||||||
usleep 10000
|
|
||||||
tune_control stop
|
|
||||||
if px4io checkcrc ${IOFW}
|
|
||||||
then
|
|
||||||
echo "PX4IO CRC OK after updating"
|
|
||||||
tune_control play -t 17 # tune 17 = PROG_PX4IO_OK
|
|
||||||
set IO_PRESENT yes
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ $IO_PRESENT = no ]
|
|
||||||
then
|
|
||||||
echo "PX4IO update failed"
|
|
||||||
tune_control play -t 18 # tune 18 = PROG_PX4IO_ERR
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ $USE_IO = yes -a $IO_PRESENT = no ]
|
|
||||||
then
|
|
||||||
echo "PX4IO not found"
|
|
||||||
tune_control play error
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#
|
#
|
||||||
|
|||||||
@@ -23,12 +23,6 @@ then
|
|||||||
param set UAVCAN_ENABLE 2
|
param set UAVCAN_ENABLE 2
|
||||||
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
|
||||||
|
|||||||
Reference in New Issue
Block a user