mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-05-24 15:40:31 +08:00
Improved sensor startup and error checking
This commit is contained in:
@@ -24,6 +24,10 @@ then
|
||||
hmc5883 start
|
||||
set BOARD fmuv1
|
||||
else
|
||||
if hmc5883 start
|
||||
then
|
||||
echo "Using external mag"
|
||||
fi
|
||||
echo "using L3GD20 and LSM303D"
|
||||
l3gd20 start
|
||||
lsm303d start
|
||||
|
||||
@@ -953,7 +953,7 @@ Sensors::baro_init()
|
||||
|
||||
if (fd < 0) {
|
||||
warn("%s", BARO_DEVICE_PATH);
|
||||
warnx("No barometer found, ignoring");
|
||||
errx(1, "FATAL: No barometer found");
|
||||
}
|
||||
|
||||
/* set the driver to poll at 150Hz */
|
||||
|
||||
@@ -263,7 +263,7 @@ system_eval:
|
||||
led_toggle(leds, LED_BLUE);
|
||||
|
||||
/* display and sound error */
|
||||
for (int i = 0; i < 150; i++)
|
||||
for (int i = 0; i < 50; i++)
|
||||
{
|
||||
led_toggle(leds, LED_BLUE);
|
||||
led_toggle(leds, LED_AMBER);
|
||||
|
||||
Reference in New Issue
Block a user