build: VRBRAIN changed start of new drivers of sensors

This commit is contained in:
LukeMike 2014-07-14 12:55:52 +02:00 committed by Andrew Tridgell
parent f1b99036e2
commit b6d361a3f7
6 changed files with 255 additions and 183 deletions

View File

@ -66,43 +66,48 @@ else
fi fi
echo "[APM] Starting APM sensors" echo "[APM] Starting APM sensors"
if ms5611 start
echo "[APM] Starting MS5611 Internal"
if ms5611 -I start
then then
echo "[APM] MS5611 started OK" echo "[APM] MS5611 onboard started OK"
else else
echo "[APM] MS5611 start failed" echo "[APM] MS5611 onboard start failed"
sh /etc/init.d/rc.error sh /etc/init.d/rc.error
fi fi
if hmc5883i start echo "[APM] Starting HMC5883 Internal"
if hmc5883 -I start
then then
echo "[APM] HMC5883 onboard started OK" echo "[APM] HMC5883 onboard started OK"
# if hmc5883 calibrate if hmc5883 calibrate
# then then
# echo "[APM] HMC5883 onboard calibrate OK" echo "[APM] HMC5883 onboard calibrate OK"
# else else
# echo "[APM] HMC5883 onboard calibrate failed" echo "[APM] HMC5883 onboard calibrate failed"
# fi fi
else else
echo "[APM] HMC5883 onboard start failed" echo "[APM] HMC5883 onboard start failed"
sh /etc/init.d/rc.error
fi
if hmc5883e start
then
echo "[APM] HMC5883 external started OK"
# if hmc5883 calibrate
# then
# echo "[APM] HMC5883 external calibrate OK"
# else
# echo "[APM] HMC5883 external calibrate failed"
# fi
else
echo "[APM] HMC5883 external start failed"
# sh /etc/init.d/rc.error # sh /etc/init.d/rc.error
fi fi
if mpu6000i start echo "[APM] Starting HMC5883 External GPS"
if hmc5883 -X start
then
echo "[APM] HMC5883 External GPS started OK"
if hmc5883 -X calibrate
then
echo "[APM] HMC5883 External GPS calibrate OK"
else
echo "[APM] HMC5883 External GPS calibrate failed"
fi
else
echo "[APM] HMC5883 External GPS start failed"
# sh /etc/init.d/rc.error
fi
echo "[APM] Starting MPU6000 Internal"
if mpu6000 -I start
then then
echo "[APM] MPU6000 onboard started OK" echo "[APM] MPU6000 onboard started OK"
else else
@ -110,7 +115,8 @@ else
sh /etc/init.d/rc.error sh /etc/init.d/rc.error
fi fi
if mpu6000e start echo "[APM] Starting MPU6000 External"
if mpu6000 -X start
then then
echo "[APM] MPU6000 external started OK" echo "[APM] MPU6000 external started OK"
else else

View File

@ -39,43 +39,48 @@ else
fi fi
echo "[APMNS] Starting APM sensors" echo "[APMNS] Starting APM sensors"
if ms5611 start
echo "[APMNS] Starting MS5611 Internal"
if ms5611 -I start
then then
echo "[APMNS] MS5611 started OK" echo "[APMNS] MS5611 onboard started OK"
else else
echo "[APMNS] MS5611 start failed" echo "[APMNS] MS5611 onboard start failed"
sh /etc/init.d/rc.error sh /etc/init.d/rc.error
fi fi
if hmc5883i start echo "[APMNS] Starting HMC5883 Internal"
if hmc5883 -I start
then then
echo "[APMNS] HMC5883 onboard started OK" echo "[APMNS] HMC5883 onboard started OK"
# if hmc5883 calibrate if hmc5883 calibrate
# then then
# echo "[APMNS] HMC5883 onboard calibrate OK" echo "[APMNS] HMC5883 onboard calibrate OK"
# else else
# echo "[APMNS] HMC5883 onboard calibrate failed" echo "[APMNS] HMC5883 onboard calibrate failed"
# fi fi
else else
echo "[APMNS] HMC5883 onboard start failed" echo "[APMNS] HMC5883 onboard start failed"
sh /etc/init.d/rc.error
fi
if hmc5883e start
then
echo "[APMNS] HMC5883 external started OK"
# if hmc5883 calibrate
# then
# echo "[APMNS] HMC5883 external calibrate OK"
# else
# echo "[APMNS] HMC5883 external calibrate failed"
# fi
else
echo "[APMNS] HMC5883 external start failed"
# sh /etc/init.d/rc.error # sh /etc/init.d/rc.error
fi fi
if mpu6000i start echo "[APMNS] Starting HMC5883 External GPS"
if hmc5883 -X start
then
echo "[APMNS] HMC5883 External GPS started OK"
if hmc5883 -X calibrate
then
echo "[APMNS] HMC5883 External GPS calibrate OK"
else
echo "[APMNS] HMC5883 External GPS calibrate failed"
fi
else
echo "[APMNS] HMC5883 External GPS start failed"
# sh /etc/init.d/rc.error
fi
echo "[APMNS] Starting MPU6000 Internal"
if mpu6000 -I start
then then
echo "[APMNS] MPU6000 onboard started OK" echo "[APMNS] MPU6000 onboard started OK"
else else
@ -83,7 +88,8 @@ else
sh /etc/init.d/rc.error sh /etc/init.d/rc.error
fi fi
if mpu6000e start echo "[APMNS] Starting MPU6000 External"
if mpu6000 -X start
then then
echo "[APMNS] MPU6000 external started OK" echo "[APMNS] MPU6000 external started OK"
else else

View File

@ -66,43 +66,81 @@ else
fi fi
echo "[APM] Starting APM sensors" echo "[APM] Starting APM sensors"
if ms5611 start
echo "[APM] Starting MS5611 Internal"
if ms5611 -I start
then then
echo "[APM] MS5611 started OK" echo "[APM] MS5611 onboard started OK"
else else
echo "[APM] MS5611 start failed" echo "[APM] MS5611 onboard start failed"
sh /etc/init.d/rc.error sh /etc/init.d/rc.error
fi fi
if hmc5883i start echo "[APM] Starting MS5611 External EXP"
if ms5611 -X start
then then
echo "[APM] HMC5883 onboard started OK" echo "[APM] MS5611 external EXP started OK"
# if hmc5883 calibrate
# then
# echo "[APM] HMC5883 onboard calibrate OK"
# else
# echo "[APM] HMC5883 onboard calibrate failed"
# fi
else else
echo "[APM] HMC5883 onboard start failed" echo "[APM] MS5611 external EXP start failed"
# sh /etc/init.d/rc.error # sh /etc/init.d/rc.error
fi fi
#if hmc5883e start echo "[APM] Starting MS5611 External IMU"
#then if ms5611 -U start
# echo "[APM] HMC5883 external started OK" then
# if hmc5883 calibrate echo "[APM] MS5611 external IMU started OK"
# then else
# echo "[APM] HMC5883 external calibrate OK" echo "[APM] MS5611 external IMU start failed"
# else
# echo "[APM] HMC5883 external calibrate failed"
# fi
#else
# echo "[APM] HMC5883 external start failed"
# sh /etc/init.d/rc.error # sh /etc/init.d/rc.error
#fi fi
if mpu6000i start echo "[APM] Starting HMC5883 External GPS"
if hmc5883 -X start
then
echo "[APM] HMC5883 External GPS started OK"
if hmc5883 -X calibrate
then
echo "[APM] HMC5883 External GPS calibrate OK"
else
echo "[APM] HMC5883 External GPS calibrate failed"
fi
else
echo "[APM] HMC5883 External GPS start failed"
# sh /etc/init.d/rc.error
fi
echo "[APM] Starting HMC5983 External EXP"
if hmc5983 -X start
then
echo "[APM] HMC5983 external EXP started OK"
if hmc5983 -X calibrate
then
echo "[APM] HMC5983 external EXP calibrate OK"
else
echo "[APM] HMC5983 external EXP calibrate failed"
fi
else
echo "[APM] HMC5983 external EXP start failed"
# sh /etc/init.d/rc.error
fi
echo "[APM] Starting HMC5983 External IMU"
if hmc5983 -U start
then
echo "[APM] HMC5983 external IMU started OK"
if hmc5983 -U calibrate
then
echo "[APM] HMC5983 external IMU calibrate OK"
else
echo "[APM] HMC5983 external IMU calibrate failed"
fi
else
echo "[APM] HMC5983 external IMU start failed"
# sh /etc/init.d/rc.error
fi
echo "[APM] Starting MPU6000 Internal"
if mpu6000 -I start
then then
echo "[APM] MPU6000 onboard started OK" echo "[APM] MPU6000 onboard started OK"
else else
@ -110,13 +148,23 @@ else
sh /etc/init.d/rc.error sh /etc/init.d/rc.error
fi fi
#if mpu6000e start echo "[APM] Starting MPU6000 External EXP"
#then if mpu6000 -X start
# echo "[APM] MPU6000 external started OK" then
#else echo "[APM] MPU6000 external EXP started OK"
# echo "[APM] MPU6000 external start failed" else
echo "[APM] MPU6000 external EXP start failed"
# sh /etc/init.d/rc.error # sh /etc/init.d/rc.error
#fi fi
echo "[APM] Starting MPU6000 External IMU"
if mpu6000 -U start
then
echo "[APM] MPU6000 external IMU started OK"
else
echo "[APM] MPU6000 external IMU start failed"
# sh /etc/init.d/rc.error
fi
echo "[APM] Starting MTD driver" echo "[APM] Starting MTD driver"
if mtd start /fs/mtd if mtd start /fs/mtd

View File

@ -39,43 +39,81 @@ else
fi fi
echo "[APMNS] Starting APM sensors" echo "[APMNS] Starting APM sensors"
if ms5611 start
echo "[APMNS] Starting MS5611 Internal"
if ms5611 -I start
then then
echo "[APMNS] MS5611 started OK" echo "[APMNS] MS5611 onboard started OK"
else else
echo "[APMNS] MS5611 start failed" echo "[APMNS] MS5611 onboard start failed"
sh /etc/init.d/rc.error sh /etc/init.d/rc.error
fi fi
if hmc5883i start echo "[APMNS] Starting MS5611 External EXP"
if ms5611 -X start
then then
echo "[APMNS] HMC5883 onboard started OK" echo "[APMNS] MS5611 external EXP started OK"
# if hmc5883 calibrate
# then
# echo "[APMNS] HMC5883 onboard calibrate OK"
# else
# echo "[APMNS] HMC5883 onboard calibrate failed"
# fi
else else
echo "[APMNS] HMC5883 onboard start failed" echo "[APMNS] MS5611 external EXP start failed"
sh /etc/init.d/rc.error
fi
if hmc5883e start
then
echo "[APMNS] HMC5883 external started OK"
# if hmc5883 calibrate
# then
# echo "[APMNS] HMC5883 external calibrate OK"
# else
# echo "[APMNS] HMC5883 external calibrate failed"
# fi
else
echo "[APMNS] HMC5883 external start failed"
# sh /etc/init.d/rc.error # sh /etc/init.d/rc.error
fi fi
if mpu6000i start echo "[APMNS] Starting MS5611 External IMU"
if ms5611 -U start
then
echo "[APMNS] MS5611 external IMU started OK"
else
echo "[APMNS] MS5611 external IMU start failed"
# sh /etc/init.d/rc.error
fi
echo "[APMNS] Starting HMC5883 External GPS"
if hmc5883 -X start
then
echo "[APMNS] HMC5883 External GPS started OK"
if hmc5883 -X calibrate
then
echo "[APMNS] HMC5883 External GPS calibrate OK"
else
echo "[APMNS] HMC5883 External GPS calibrate failed"
fi
else
echo "[APMNS] HMC5883 External GPS start failed"
# sh /etc/init.d/rc.error
fi
echo "[APMNS] Starting HMC5983 External EXP"
if hmc5983 -X start
then
echo "[APMNS] HMC5983 external EXP started OK"
if hmc5983 -X calibrate
then
echo "[APMNS] HMC5983 external EXP calibrate OK"
else
echo "[APMNS] HMC5983 external EXP calibrate failed"
fi
else
echo "[APMNS] HMC5983 external EXP start failed"
# sh /etc/init.d/rc.error
fi
echo "[APMNS] Starting HMC5983 External IMU"
if hmc5983 -U start
then
echo "[APMNS] HMC5983 external IMU started OK"
if hmc5983 -U calibrate
then
echo "[APMNS] HMC5983 external IMU calibrate OK"
else
echo "[APMNS] HMC5983 external IMU calibrate failed"
fi
else
echo "[APMNS] HMC5983 external IMU start failed"
# sh /etc/init.d/rc.error
fi
echo "[APMNS] Starting MPU6000 Internal"
if mpu6000 -I start
then then
echo "[APMNS] MPU6000 onboard started OK" echo "[APMNS] MPU6000 onboard started OK"
else else
@ -83,11 +121,21 @@ else
sh /etc/init.d/rc.error sh /etc/init.d/rc.error
fi fi
if mpu6000e start echo "[APMNS] Starting MPU6000 External EXP"
if mpu6000 -X start
then then
echo "[APMNS] MPU6000 external started OK" echo "[APMNS] MPU6000 external EXP started OK"
else else
echo "[APMNS] MPU6000 external start failed" echo "[APMNS] MPU6000 external EXP start failed"
# sh /etc/init.d/rc.error
fi
echo "[APMNS] Starting MPU6000 External IMU"
if mpu6000 -U start
then
echo "[APMNS] MPU6000 external IMU started OK"
else
echo "[APMNS] MPU6000 external IMU start failed"
# sh /etc/init.d/rc.error # sh /etc/init.d/rc.error
fi fi

View File

@ -66,43 +66,33 @@ else
fi fi
echo "[APM] Starting APM sensors" echo "[APM] Starting APM sensors"
if ms5611 start
echo "[APM] Starting MS5611 Internal"
if ms5611 -I start
then then
echo "[APM] MS5611 started OK" echo "[APM] MS5611 onboard started OK"
else else
echo "[APM] MS5611 start failed" echo "[APM] MS5611 onboard start failed"
sh /etc/init.d/rc.error sh /etc/init.d/rc.error
fi fi
#if hmc5883i start echo "[APM] Starting HMC5883 External GPS"
#then if hmc5883 -X start
# echo "[APM] HMC5883 onboard started OK"
# if hmc5883 calibrate
# then
# echo "[APM] HMC5883 onboard calibrate OK"
# else
# echo "[APM] HMC5883 onboard calibrate failed"
# fi
#else
# echo "[APM] HMC5883 onboard start failed"
# sh /etc/init.d/rc.error
#fi
if hmc5883e start
then then
echo "[APM] HMC5883 external started OK" echo "[APM] HMC5883 External GPS started OK"
# if hmc5883 calibrate if hmc5883 -X calibrate
# then then
# echo "[APM] HMC5883 external calibrate OK" echo "[APM] HMC5883 External GPS calibrate OK"
# else else
# echo "[APM] HMC5883 external calibrate failed" echo "[APM] HMC5883 External GPS calibrate failed"
# fi fi
else else
echo "[APM] HMC5883 external start failed" echo "[APM] HMC5883 External GPS start failed"
# sh /etc/init.d/rc.error # sh /etc/init.d/rc.error
fi fi
if mpu6000i start echo "[APM] Starting MPU6000 Internal"
if mpu6000 -I start
then then
echo "[APM] MPU6000 onboard started OK" echo "[APM] MPU6000 onboard started OK"
else else
@ -110,14 +100,6 @@ else
sh /etc/init.d/rc.error sh /etc/init.d/rc.error
fi fi
#if mpu6000e start
#then
# echo "[APM] MPU6000 external started OK"
#else
# echo "[APM] MPU6000 external start failed"
# sh /etc/init.d/rc.error
#fi
echo "[APM] Starting MTD driver" echo "[APM] Starting MTD driver"
if mtd start /fs/mtd if mtd start /fs/mtd
then then

View File

@ -39,43 +39,33 @@ else
fi fi
echo "[APMNS] Starting APM sensors" echo "[APMNS] Starting APM sensors"
if ms5611 start
echo "[APMNS] Starting MS5611 Internal"
if ms5611 -I start
then then
echo "[APMNS] MS5611 started OK" echo "[APMNS] MS5611 onboard started OK"
else else
echo "[APMNS] MS5611 start failed" echo "[APMNS] MS5611 onboard start failed"
sh /etc/init.d/rc.error sh /etc/init.d/rc.error
fi fi
#if hmc5883i start echo "[APMNS] Starting HMC5883 External GPS"
#then if hmc5883 -X start
# echo "[APMNS] HMC5883 onboard started OK"
# if hmc5883 calibrate
# then
# echo "[APMNS] HMC5883 onboard calibrate OK"
# else
# echo "[APMNS] HMC5883 onboard calibrate failed"
# fi
#else
# echo "[APMNS] HMC5883 onboard start failed"
# sh /etc/init.d/rc.error
#fi
if hmc5883e start
then then
echo "[APMNS] HMC5883 external started OK" echo "[APMNS] HMC5883 External GPS started OK"
# if hmc5883 calibrate if hmc5883 -X calibrate
# then then
# echo "[APMNS] HMC5883 external calibrate OK" echo "[APMNS] HMC5883 External GPS calibrate OK"
# else else
# echo "[APMNS] HMC5883 external calibrate failed" echo "[APMNS] HMC5883 External GPS calibrate failed"
# fi fi
else else
echo "[APMNS] HMC5883 external start failed" echo "[APMNS] HMC5883 External GPS start failed"
# sh /etc/init.d/rc.error # sh /etc/init.d/rc.error
fi fi
if mpu6000i start echo "[APMNS] Starting MPU6000 Internal"
if mpu6000 -I start
then then
echo "[APMNS] MPU6000 onboard started OK" echo "[APMNS] MPU6000 onboard started OK"
else else
@ -83,14 +73,6 @@ else
sh /etc/init.d/rc.error sh /etc/init.d/rc.error
fi fi
#if mpu6000e start
#then
# echo "[APMNS] MPU6000 external started OK"
#else
# echo "[APMNS] MPU6000 external start failed"
# sh /etc/init.d/rc.error
#fi
echo "[APMNS] Starting MTD driver" echo "[APMNS] Starting MTD driver"
if mtd start /fs/mtd if mtd start /fs/mtd
then then