From 8957b473a8066e6baf27e108cd3280c82d67b1f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beat=20K=C3=BCng?= Date: Fri, 3 Mar 2017 17:40:02 +0100 Subject: [PATCH] px4fmu rcS: start sensors in hil mode if HIL is set, don't load rc.sensors This makes sure no sensor publishes sensor topics, instead they will be published from mavlink. --- ROMFS/px4fmu_common/init.d/rcS | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/ROMFS/px4fmu_common/init.d/rcS b/ROMFS/px4fmu_common/init.d/rcS index 9b7ce9a6fd..60129896bb 100644 --- a/ROMFS/px4fmu_common/init.d/rcS +++ b/ROMFS/px4fmu_common/init.d/rcS @@ -399,9 +399,7 @@ then then set FMU_MODE serial fi - unset HIL else - unset HIL gps start fi @@ -420,7 +418,13 @@ then # # Sensors System (start before Commander so Preflight checks are properly run) # - sh /etc/init.d/rc.sensors + if [ $HIL == yes ] + then + sensors start -hil + else + sh /etc/init.d/rc.sensors + fi + unset HIL # Needs to be this early for in-air-restarts if [ $OUTPUT_MODE == hil ]