diff options
author | Lorenz Meier <lm@inf.ethz.ch> | 2014-08-26 20:17:57 +0200 |
---|---|---|
committer | Lorenz Meier <lm@inf.ethz.ch> | 2014-08-26 20:17:57 +0200 |
commit | e14366fef3192626b501e9d63d41c58bc22d8c2a (patch) | |
tree | 70045156e376ae336555281ebda461a347649e24 /ROMFS/px4fmu_common/init.d | |
parent | fcebafba778ff981f1b485d7cb30fed5dce6295c (diff) | |
parent | f2683c23e966ff93d8f438beb63bdf6ef676139d (diff) | |
download | px4-firmware-e14366fef3192626b501e9d63d41c58bc22d8c2a.tar.gz px4-firmware-e14366fef3192626b501e9d63d41c58bc22d8c2a.tar.bz2 px4-firmware-e14366fef3192626b501e9d63d41c58bc22d8c2a.zip |
Merged master
Diffstat (limited to 'ROMFS/px4fmu_common/init.d')
-rw-r--r-- | ROMFS/px4fmu_common/init.d/rc.uavcan | 18 | ||||
-rw-r--r-- | ROMFS/px4fmu_common/init.d/rcS | 11 |
2 files changed, 25 insertions, 4 deletions
diff --git a/ROMFS/px4fmu_common/init.d/rc.uavcan b/ROMFS/px4fmu_common/init.d/rc.uavcan new file mode 100644 index 000000000..9a470a6b8 --- /dev/null +++ b/ROMFS/px4fmu_common/init.d/rc.uavcan @@ -0,0 +1,18 @@ +#!nsh +# +# UAVCAN initialization script. +# + +if param compare UAVCAN_ENABLE 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 "[init] UAVCAN started" + else + echo "[init] ERROR: Could not start UAVCAN" + tone_alarm $TUNE_OUT_ERROR + fi +fi diff --git a/ROMFS/px4fmu_common/init.d/rcS b/ROMFS/px4fmu_common/init.d/rcS index 5f7a205dc..349b82f40 100644 --- a/ROMFS/px4fmu_common/init.d/rcS +++ b/ROMFS/px4fmu_common/init.d/rcS @@ -304,11 +304,10 @@ then then if [ $OUTPUT_MODE == uavcan_esc ] then - if uavcan start 1 + if param compare UAVCAN_ENABLE 0 then - echo "CAN UP" - else - echo "CAN ERR" + echo "[init] OVERRIDING UAVCAN_ENABLE = 1" + param set UAVCAN_ENABLE 1 fi fi @@ -455,6 +454,10 @@ then mavlink start -d /dev/ttyS2 -b 230400 fi + # UAVCAN + # + sh /etc/init.d/rc.uavcan + # # Sensors, Logging, GPS # |