Closing all opened file descriptors, fixed param save issue, tests clean

This commit is contained in:
Lorenz Meier
2013-09-01 12:47:10 +02:00
parent 9eff3170a3
commit 2d83c6f825
8 changed files with 57 additions and 48 deletions
@@ -142,6 +142,10 @@ int preflight_check_main(int argc, char *argv[])
bool rc_ok = (OK == rc_calibration_check());
/* warn */
if (!rc_ok)
warnx("rc calibration test failed");
/* require RC ok to keep system_ok */
system_ok &= rc_ok;
@@ -156,6 +160,9 @@ system_eval:
} else {
fflush(stdout);
warnx("PREFLIGHT CHECK ERROR! TRIGGERING ALARM");
fflush(stderr);
int buzzer = open("/dev/tone_alarm", O_WRONLY);
int leds = open(LED_DEVICE_PATH, 0);