#!/bin/sh
#
# UVify UVF4 specific board sensors init
#------------------------------------------------------------------------------

adc start

# Internal SPI
ms5611 -T 0 -s start

# Draco-R
if param compare SYS_AUTOSTART 6002
then
	# GPS LED
	rgbled_ncp5623c start -a 0x38

	#mpu6000 -R 4 -T 20608 start
	mpu9250 -R 4 start

	# Default GNSS with LIS3MDL magnetometer with external i2c.
	lis3mdl -R 2 -X start
fi

# Draco
if param compare SYS_AUTOSTART 4072
then
	mpu9250 -R 2 start
fi

# IFO
if param compare SYS_AUTOSTART 4071
then
	# IFO GPS LED
	rgbled_ncp5623c start -a 0x38

	# IFO rgb LED
	pca9685 start

	mpu9250 -R 2 start
	lis3mdl -R 2 -X start
fi
