mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-06-01 02:55:07 +08:00
Reboot board on critical sensor failure
This commit is contained in:
+26
-15
@@ -7,22 +7,33 @@
|
|||||||
# Start sensor drivers here.
|
# Start sensor drivers here.
|
||||||
#
|
#
|
||||||
|
|
||||||
ms5611 start
|
if ms5611 start
|
||||||
mpu6000 start
|
then
|
||||||
hmc5883 start
|
else
|
||||||
|
echo "[init] BARO initialization FAILED. REBOOTING"
|
||||||
|
reboot
|
||||||
|
fi
|
||||||
|
|
||||||
|
if mpu6000 start
|
||||||
|
then
|
||||||
|
else
|
||||||
|
echo "[init] ACCEL/GYRO initialization FAILED. REBOOTING"
|
||||||
|
reboot
|
||||||
|
fi
|
||||||
|
|
||||||
|
if hmc5883 start
|
||||||
|
then
|
||||||
|
else
|
||||||
|
echo "[init] MAG initialization FAILED. REBOOTING"
|
||||||
|
reboot
|
||||||
|
fi
|
||||||
|
|
||||||
#
|
#
|
||||||
# Start the sensor collection task.
|
# Start the sensor collection task.
|
||||||
#
|
#
|
||||||
sensors start
|
if sensors start
|
||||||
|
then
|
||||||
#
|
else
|
||||||
# Test sensor functionality
|
echo "[init] sensor initialization FAILED. REBOOTING"
|
||||||
#
|
reboot
|
||||||
# XXX integrate with 'sensors start' ?
|
fi
|
||||||
#
|
|
||||||
#if sensors quicktest
|
|
||||||
#then
|
|
||||||
# echo "[init] sensor initialisation FAILED."
|
|
||||||
# reboot
|
|
||||||
#fi
|
|
||||||
Reference in New Issue
Block a user