From 126172d70c9362a6b6cadcac5584e539db280842 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Roberto=20de=20Souza?= Date: Wed, 30 Nov 2016 13:25:33 -0200 Subject: [PATCH] Aerofc: px4fmu_common: Only set AUTOSTART to 4070 if nothing was set This way user can set aftwards any other AUTOSTART value and it will not be overwritten. Also move the block up and set SYS_AUTOCONFIG, this way if air frame configuration was reset in ground station it will wipe the parameters before load new ones. --- ROMFS/px4fmu_common/init.d/rcS | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/ROMFS/px4fmu_common/init.d/rcS b/ROMFS/px4fmu_common/init.d/rcS index 38dfa6a037..2168a17d5c 100644 --- a/ROMFS/px4fmu_common/init.d/rcS +++ b/ROMFS/px4fmu_common/init.d/rcS @@ -99,6 +99,15 @@ then #then #fi + if ver hwcmp AEROFC_V1 + then + if param compare SYS_AUTOSTART 0 + then + param set SYS_AUTOCONFIG 1 + param set SYS_AUTOSTART 4070 + fi + fi + # # Set AUTOCNF flag to use it in AUTOSTART scripts # @@ -185,15 +194,6 @@ then set USE_IO no fi - if ver hwcmp AEROFC_V1 - then - if param compare SYS_AUTOSTART 0 - then - set AUTOCNF yes - fi - param set SYS_AUTOSTART 4070 - fi - # # Set parameters and env variables for selected AUTOSTART #