Skip to content

Commit

Permalink
Move uavcan start to end of rcS to prevent sd card read lock
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexKlimaj authored and dagar committed Feb 14, 2023
1 parent 486674a commit 5334ec1
Showing 1 changed file with 22 additions and 22 deletions.
44 changes: 22 additions & 22 deletions ROMFS/px4fmu_common/init.d/rcS
Original file line number Diff line number Diff line change
Expand Up @@ -282,28 +282,6 @@ else
param set SYS_AUTOCONFIG 0
fi

#
# Check if UAVCAN is enabled, default to it for ESCs.
#
if param greater -s UAVCAN_ENABLE 0
then
# Start core UAVCAN module.
if uavcan start
then
if param greater UAVCAN_ENABLE 2
then
set OUTPUT_MODE uavcan_esc
fi
else
tune_control play error
fi
else
if param greater -s UAVCAN_V1_ENABLE 0
then
uavcan_v1 start
fi
fi

#
# Check if PX4IO present and update firmware if needed.
# Assumption IOFW set to firmware file and IO_PRESENT = no
Expand Down Expand Up @@ -556,6 +534,28 @@ else
fi
unset BOARD_BOOTLOADER_UPGRADE

#
# Check if UAVCAN is enabled, default to it for ESCs.
#
if param greater -s UAVCAN_ENABLE 0
then
# Start core UAVCAN module.
if uavcan start
then
if param greater UAVCAN_ENABLE 2
then
set OUTPUT_MODE uavcan_esc
fi
else
tune_control play error
fi
else
if param greater -s UAVCAN_V1_ENABLE 0
then
uavcan_v1 start
fi
fi

#
# End of autostart.
#
Expand Down

0 comments on commit 5334ec1

Please sign in to comment.