From a8b91c7ac9f9cba2b6b036698b06191f7ca42492 Mon Sep 17 00:00:00 2001
From: Daniel Agar <daniel@agar.ca>
Date: Fri, 30 Nov 2018 14:32:50 -0500
Subject: [PATCH] move intel_aerofc-v1 init to rc.board

---
 ROMFS/px4fmu_common/init.d/rc.logging |  9 ---------
 ROMFS/px4fmu_common/init.d/rc.sensors | 13 -------------
 ROMFS/px4fmu_common/init.d/rcS        | 17 +++--------------
 3 files changed, 3 insertions(+), 36 deletions(-)

diff --git a/ROMFS/px4fmu_common/init.d/rc.logging b/ROMFS/px4fmu_common/init.d/rc.logging
index 1e4c2e7716..b1aacdf766 100644
--- a/ROMFS/px4fmu_common/init.d/rc.logging
+++ b/ROMFS/px4fmu_common/init.d/rc.logging
@@ -4,8 +4,6 @@
 # NOTE: Script variables are declared/initialized/unset in the rcS script.
 #
 
-set LOGGER_ARGS ""
-
 if param greater UAVCAN_ENABLE 1
 then
 	# Reduce logger buffer to free up some RAM for UAVCAN servers.
@@ -26,11 +24,4 @@ then
 	set LOGGER_ARGS "-f"
 fi
 
-if ver hwcmp INTEL_AEROFC_V1
-then
-	set LOGGER_ARGS "-m mavlink"
-fi
-
 logger start -b ${LOGGER_BUF} -t ${LOGGER_ARGS}
-
-unset LOGGER_ARGS
diff --git a/ROMFS/px4fmu_common/init.d/rc.sensors b/ROMFS/px4fmu_common/init.d/rc.sensors
index a91d17401a..5b87bc5495 100644
--- a/ROMFS/px4fmu_common/init.d/rc.sensors
+++ b/ROMFS/px4fmu_common/init.d/rc.sensors
@@ -31,19 +31,6 @@ then
 	adc start
 fi
 
-if ver hwcmp INTEL_AEROFC_V1
-then
-	ms5611 -T 0 start
-	mpu9250 -s -R 14 start
-
-	# Possible external compasses
-	hmc5883 -X start
-
-	ist8310 -C -b 1 -R 4 start
-	aerofc_adc start
-	ll40ls start i2c
-fi
-
 if ver hwcmp GUMSTIX_AEROCORE2
 then
 	l3gd20 -R 12 start
diff --git a/ROMFS/px4fmu_common/init.d/rcS b/ROMFS/px4fmu_common/init.d/rcS
index 21e783f850..86c801266d 100644
--- a/ROMFS/px4fmu_common/init.d/rcS
+++ b/ROMFS/px4fmu_common/init.d/rcS
@@ -33,6 +33,7 @@ set FMU_MODE pwm
 set IOFW "/etc/extras/px4_io-v2_default.bin"
 set IO_PRESENT no
 set LOG_FILE /fs/microsd/bootlog.txt
+set LOGGER_ARGS ""
 set LOGGER_BUF  14
 set MAV_TYPE none
 set MIXER none
@@ -142,6 +143,7 @@ else
 	# Waypoint storage.
 	# REBOOTWORK this needs to start in parallel.
 	#
+	# TODO: fix board override $DATAMAN_OPT
 	dataman start $DATAMAN_OPT
 
 	#
@@ -228,20 +230,6 @@ else
 		set DATAMAN_OPT "-f /fs/mtd_dataman"
 	fi
 
-	if ver hwcmp INTEL_AEROFC_V1
-	then
-		if param compare SYS_AUTOSTART 0
-		then
-			set AUTOCNF yes
-		fi
-
-		# We don't allow changing AUTOSTART as it doesn't work in
-		# other configurations.
-		param set SYS_AUTOSTART 4070
-
-		set DATAMAN_OPT -i
-	fi
-
 	if ver hwcmp BITCRAZE_CRAZYFLIE
 	then
 		if param compare SYS_AUTOSTART 0
@@ -509,6 +497,7 @@ unset FMU_MODE
 unset IOFW
 unset IO_PRESENT
 unset LOG_FILE
+unset LOGGER_ARGS
 unset LOGGER_BUF
 unset MAV_TYPE
 unset MIXER
-- 
GitLab