Improved sensor startup and error checking

This commit is contained in:
Lorenz Meier
2013-08-19 17:35:07 +02:00
parent 871b4c19bc
commit f4b5a17a7b
3 changed files with 6 additions and 2 deletions
+1 -1
View File
@@ -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);