diff options
author | Lorenz Meier <lm@inf.ethz.ch> | 2014-01-05 15:23:54 +0100 |
---|---|---|
committer | Lorenz Meier <lm@inf.ethz.ch> | 2014-01-05 15:23:54 +0100 |
commit | 40196275d0e899eac49731d0c2b1dda96cafb84f (patch) | |
tree | a9fbc6b107a405b168cd3381b2831e341e0a0e87 /src/systemcmds | |
parent | d114ff1ac96fa3485146ee411cbc1b07a32cb7ce (diff) | |
download | px4-firmware-40196275d0e899eac49731d0c2b1dda96cafb84f.tar.gz px4-firmware-40196275d0e899eac49731d0c2b1dda96cafb84f.tar.bz2 px4-firmware-40196275d0e899eac49731d0c2b1dda96cafb84f.zip |
Compile warning fixes on preflight check
Diffstat (limited to 'src/systemcmds')
-rw-r--r-- | src/systemcmds/preflight_check/preflight_check.c | 3 |
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'"); |