aboutsummaryrefslogtreecommitdiff
path: root/src/systemcmds
diff options
context:
space:
mode:
authorAnton Babushkin <anton.babushkin@me.com>2014-01-06 08:08:35 +0100
committerAnton Babushkin <anton.babushkin@me.com>2014-01-06 08:08:35 +0100
commit300d891d762acaabee21cbeac9daa25049cae75f (patch)
tree5f8047b0fa9f3c27822b5ddc50f29e000a9b310c /src/systemcmds
parentdae5c838422a6250e1a7e4920d59cb8976a16a8c (diff)
parent40196275d0e899eac49731d0c2b1dda96cafb84f (diff)
downloadpx4-firmware-300d891d762acaabee21cbeac9daa25049cae75f.tar.gz
px4-firmware-300d891d762acaabee21cbeac9daa25049cae75f.tar.bz2
px4-firmware-300d891d762acaabee21cbeac9daa25049cae75f.zip
Merge branch 'navigator_new' into navigator_new_vector
Diffstat (limited to 'src/systemcmds')
-rw-r--r--src/systemcmds/preflight_check/preflight_check.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/systemcmds/preflight_check/preflight_check.c b/src/systemcmds/preflight_check/preflight_check.c
index 982b03782..86e4ff545 100644
--- a/src/systemcmds/preflight_check/preflight_check.c
+++ b/src/systemcmds/preflight_check/preflight_check.c
@@ -44,6 +44,7 @@
#include <string.h>
#include <fcntl.h>
#include <errno.h>
+#include <math.h>
#include <systemlib/err.h>
#include <systemlib/param/param.h>
@@ -87,9 +88,7 @@ int preflight_check_main(int argc, char *argv[])
/* give the system some time to sample the sensors in the background */
usleep(150000);
-
/* ---- MAG ---- */
- close(fd);
fd = open(MAG_DEVICE_PATH, 0);
if (fd < 0) {
warn("failed to open magnetometer - start with 'hmc5883 start' or 'lsm303d start'");