From 15c75ebb4010697ea7ff9e5ca375ba8d850cfe9f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Roberto=20de=20Souza?= Date: Fri, 9 Sep 2016 14:42:26 -0300 Subject: [PATCH] aerofc: Add autostart script As ASC use a non-standard UART for mavlink it is necessary check for the board name and set SYS_AUTOSTART to initialize mavlink on the right interface otherwise there is no way to change the SYS_AUTOSTART. --- ROMFS/px4fmu_common/init.d/4070_aerofc | 13 +++++++++++++ ROMFS/px4fmu_common/init.d/rcS | 5 +++++ 2 files changed, 18 insertions(+) create mode 100644 ROMFS/px4fmu_common/init.d/4070_aerofc diff --git a/ROMFS/px4fmu_common/init.d/4070_aerofc b/ROMFS/px4fmu_common/init.d/4070_aerofc new file mode 100644 index 0000000000..47f0cbd76d --- /dev/null +++ b/ROMFS/px4fmu_common/init.d/4070_aerofc @@ -0,0 +1,13 @@ +#!nsh +# +# @name AEROFC V1 board +# +# @type Quadrotor x + +sh /etc/init.d/rc.mc_defaults + +tap_esc start -d /dev/ttyS0 -n 4 +set OUTPUT_DEV /dev/tap_esc +set MIXER quad_x + +set MAVLINK_F "-r 1200 -d /dev/ttyS2" diff --git a/ROMFS/px4fmu_common/init.d/rcS b/ROMFS/px4fmu_common/init.d/rcS index 6779cb0420..049809621c 100644 --- a/ROMFS/px4fmu_common/init.d/rcS +++ b/ROMFS/px4fmu_common/init.d/rcS @@ -179,6 +179,11 @@ then set USE_IO no fi + if ver hwcmp AEROFC_V1 + then + param set SYS_AUTOSTART 4070 + fi + # # Set parameters and env variables for selected AUTOSTART #