From ecb45b656a85a08bb2a03c06144b2be289cf2ca9 Mon Sep 17 00:00:00 2001 From: Lorenz Meier Date: Sat, 19 Sep 2015 17:09:45 +0200 Subject: [PATCH] Clean up UAVCAN startup --- ROMFS/px4fmu_common/init.d/rc.uavcan | 27 ++------------------------- 1 file changed, 2 insertions(+), 25 deletions(-) diff --git a/ROMFS/px4fmu_common/init.d/rc.uavcan b/ROMFS/px4fmu_common/init.d/rc.uavcan index 37e6893bd1..ebecea2de4 100644 --- a/ROMFS/px4fmu_common/init.d/rc.uavcan +++ b/ROMFS/px4fmu_common/init.d/rc.uavcan @@ -3,26 +3,10 @@ # UAVCAN initialization script. # -# -# Mirriring the UAVCAN_ENABLE param value to an eponymous environment variable. -# TODO there should be a smarter way. -# -set UAVCAN_ENABLE 0 -if param compare UAVCAN_ENABLE 1 -then - set UAVCAN_ENABLE 1 -fi -if param compare UAVCAN_ENABLE 2 -then - set UAVCAN_ENABLE 2 -fi - -echo "[i] UAVCAN_ENABLE is $UAVCAN_ENABLE" - # # Starting stuff according to UAVCAN_ENABLE value # -if [ $UAVCAN_ENABLE -ge 1 ] +if param greater UAVCAN_ENABLE 0 then if uavcan start then @@ -33,7 +17,7 @@ then fi fi -if [ $UAVCAN_ENABLE -ge 2 ] +if param greater UAVCAN_ENABLE 1 then if uavcan start fw then @@ -43,10 +27,3 @@ then tone_alarm $TUNE_ERR fi fi - -if [ $UAVCAN_ENABLE -ge 1 ] -then - # First sensor publisher to initialize takes lowest instance ID - # This delay ensures that UAVCAN-interfaced sensors will be allocated on lowest instance IDs - sleep 8 -fi