diff options
author | Lorenz Meier <lm@inf.ethz.ch> | 2015-02-03 13:47:29 +0100 |
---|---|---|
committer | Lorenz Meier <lm@inf.ethz.ch> | 2015-02-09 22:56:22 +0100 |
commit | ac155b0faca7e9c378e9059d318e1f5151c61561 (patch) | |
tree | 98767b56d567fddeded86199b8ad4e47b2fa12d5 /src/systemcmds/preflight_check | |
parent | 2f4d820063b7712a3acae8f5336439ebbd43fe80 (diff) | |
download | px4-firmware-ac155b0faca7e9c378e9059d318e1f5151c61561.tar.gz px4-firmware-ac155b0faca7e9c378e9059d318e1f5151c61561.tar.bz2 px4-firmware-ac155b0faca7e9c378e9059d318e1f5151c61561.zip |
System cmds: Move to 0 based index
Diffstat (limited to 'src/systemcmds/preflight_check')
-rw-r--r-- | src/systemcmds/preflight_check/preflight_check.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/systemcmds/preflight_check/preflight_check.c b/src/systemcmds/preflight_check/preflight_check.c index c5c959cf3..8c2a5ac7c 100644 --- a/src/systemcmds/preflight_check/preflight_check.c +++ b/src/systemcmds/preflight_check/preflight_check.c @@ -90,7 +90,7 @@ int preflight_check_main(int argc, char *argv[]) usleep(150000); /* ---- MAG ---- */ - fd = open(MAG_DEVICE_PATH, 0); + fd = open(MAG0_DEVICE_PATH, 0); if (fd < 0) { warn("failed to open magnetometer - start with 'hmc5883 start' or 'lsm303d start'"); mavlink_log_critical(mavlink_fd, "SENSOR FAIL: NO MAG"); @@ -119,7 +119,7 @@ int preflight_check_main(int argc, char *argv[]) /* ---- ACCEL ---- */ close(fd); - fd = open(ACCEL_DEVICE_PATH, O_RDONLY); + fd = open(ACCEL0_DEVICE_PATH, O_RDONLY); devid = ioctl(fd, DEVIOCGDEVICEID,0); param_get(param_find("CAL_ACC0_ID"), &(calibration_devid)); @@ -165,7 +165,7 @@ int preflight_check_main(int argc, char *argv[]) /* ---- GYRO ---- */ close(fd); - fd = open(GYRO_DEVICE_PATH, 0); + fd = open(GYRO0_DEVICE_PATH, 0); devid = ioctl(fd, DEVIOCGDEVICEID,0); param_get(param_find("CAL_GYRO0_ID"), &(calibration_devid)); @@ -188,7 +188,7 @@ int preflight_check_main(int argc, char *argv[]) /* ---- BARO ---- */ close(fd); - fd = open(BARO_DEVICE_PATH, 0); + fd = open(BARO0_DEVICE_PATH, 0); close(fd); /* ---- RC CALIBRATION ---- */ @@ -216,8 +216,8 @@ system_eval: warnx("PREFLIGHT CHECK ERROR! TRIGGERING ALARM"); fflush(stderr); - int buzzer = open(TONEALARM_DEVICE_PATH, O_WRONLY); - int leds = open(LED_DEVICE_PATH, 0); + int buzzer = open(TONEALARM0_DEVICE_PATH, O_WRONLY); + int leds = open(LED0_DEVICE_PATH, 0); if (leds < 0) { close(buzzer); |