diff --git a/ROMFS/px4fmu_common/init.d/rc.uavcan b/ROMFS/px4fmu_common/init.d/rc.uavcan index 9f38ff90bc..3615c177de 100644 --- a/ROMFS/px4fmu_common/init.d/rc.uavcan +++ b/ROMFS/px4fmu_common/init.d/rc.uavcan @@ -10,11 +10,11 @@ set UAVCAN_ENABLE 0 if param compare UAVCAN_ENABLE 1 then - set UAVCAN_ENABLE 1 + set UAVCAN_ENABLE 1 fi if param compare UAVCAN_ENABLE 2 then - set UAVCAN_ENABLE 2 + set UAVCAN_ENABLE 2 fi echo "[i] UAVCAN_ENABLE is $UAVCAN_ENABLE" @@ -26,9 +26,6 @@ if [ $UAVCAN_ENABLE -ge 1 ] then if uavcan start then - # First sensor publisher to initialize takes lowest instance ID - # This delay ensures that UAVCAN-interfaced sensors would be allocated on lowest instance IDs - sleep 1 echo "[i] UAVCAN started" else echo "[i] ERROR: Could not start UAVCAN" @@ -38,11 +35,15 @@ fi if [ $UAVCAN_ENABLE -ge 2 ] then - if uavcan start fw - then - echo "[i] UAVCAN servers started" - else - echo "[i] ERROR: Could not start UAVCAN servers" - tone_alarm $TUNE_ERR - fi + if uavcan start fw + then + echo "[i] UAVCAN servers started" + else + echo "[i] ERROR: Could not start UAVCAN servers" + tone_alarm $TUNE_ERR + fi fi + +# 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 diff --git a/ROMFS/px4fmu_common/init.d/rcS b/ROMFS/px4fmu_common/init.d/rcS index c1c8dc303d..b21ca9ec88 100644 --- a/ROMFS/px4fmu_common/init.d/rcS +++ b/ROMFS/px4fmu_common/init.d/rcS @@ -299,6 +299,11 @@ then then fi + # + # UAVCAN + # + sh /etc/init.d/rc.uavcan + # # Sensors System (start before Commander so Preflight checks are properly run) # @@ -491,10 +496,6 @@ then fi fi - # UAVCAN - # - sh /etc/init.d/rc.uavcan - # # Logging #