From ac155b0faca7e9c378e9059d318e1f5151c61561 Mon Sep 17 00:00:00 2001 From: Lorenz Meier Date: Tue, 3 Feb 2015 13:47:29 +0100 Subject: System cmds: Move to 0 based index --- src/systemcmds/tests/test_adc.c | 2 +- src/systemcmds/tests/test_hrt.c | 4 ++-- src/systemcmds/tests/test_jig_voltages.c | 2 +- src/systemcmds/tests/test_led.c | 2 +- src/systemcmds/tests/test_ppm_loopback.c | 2 +- src/systemcmds/tests/test_servo.c | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) (limited to 'src/systemcmds/tests') diff --git a/src/systemcmds/tests/test_adc.c b/src/systemcmds/tests/test_adc.c index 03391b851..9f6905239 100644 --- a/src/systemcmds/tests/test_adc.c +++ b/src/systemcmds/tests/test_adc.c @@ -58,7 +58,7 @@ int test_adc(int argc, char *argv[]) { - int fd = open(ADC_DEVICE_PATH, O_RDONLY); + int fd = open(ADC0_DEVICE_PATH, O_RDONLY); if (fd < 0) { warnx("ERROR: can't open ADC device"); diff --git a/src/systemcmds/tests/test_hrt.c b/src/systemcmds/tests/test_hrt.c index 5690997a9..3ac99a5f6 100644 --- a/src/systemcmds/tests/test_hrt.c +++ b/src/systemcmds/tests/test_hrt.c @@ -124,10 +124,10 @@ int test_tone(int argc, char *argv[]) int fd, result; unsigned long tone; - fd = open(TONEALARM_DEVICE_PATH, O_WRONLY); + fd = open(TONEALARM0_DEVICE_PATH, O_WRONLY); if (fd < 0) { - printf("failed opening " TONEALARM_DEVICE_PATH "\n"); + printf("failed opening " TONEALARM0_DEVICE_PATH "\n"); goto out; } diff --git a/src/systemcmds/tests/test_jig_voltages.c b/src/systemcmds/tests/test_jig_voltages.c index 10c93b264..98a105cb3 100644 --- a/src/systemcmds/tests/test_jig_voltages.c +++ b/src/systemcmds/tests/test_jig_voltages.c @@ -90,7 +90,7 @@ int test_jig_voltages(int argc, char *argv[]) { - int fd = open(ADC_DEVICE_PATH, O_RDONLY); + int fd = open(ADC0_DEVICE_PATH, O_RDONLY); int ret = OK; if (fd < 0) { diff --git a/src/systemcmds/tests/test_led.c b/src/systemcmds/tests/test_led.c index 6e3efc668..a8ee678b5 100644 --- a/src/systemcmds/tests/test_led.c +++ b/src/systemcmds/tests/test_led.c @@ -91,7 +91,7 @@ int test_led(int argc, char *argv[]) int fd; int ret = 0; - fd = open(LED_DEVICE_PATH, 0); + fd = open(LED0_DEVICE_PATH, 0); if (fd < 0) { printf("\tLED: open fail\n"); diff --git a/src/systemcmds/tests/test_ppm_loopback.c b/src/systemcmds/tests/test_ppm_loopback.c index addd57bea..a753f45c2 100644 --- a/src/systemcmds/tests/test_ppm_loopback.c +++ b/src/systemcmds/tests/test_ppm_loopback.c @@ -67,7 +67,7 @@ int test_ppm_loopback(int argc, char *argv[]) int servo_fd, result; servo_position_t pos; - servo_fd = open(PWM_OUTPUT_DEVICE_PATH, O_RDWR); + servo_fd = open(PWM_OUTPUT0_DEVICE_PATH, O_RDWR); if (servo_fd < 0) { printf("failed opening /dev/pwm_servo\n"); diff --git a/src/systemcmds/tests/test_servo.c b/src/systemcmds/tests/test_servo.c index 9c6951ca2..ba6848522 100644 --- a/src/systemcmds/tests/test_servo.c +++ b/src/systemcmds/tests/test_servo.c @@ -63,7 +63,7 @@ int test_servo(int argc, char *argv[]) servo_position_t data[PWM_OUTPUT_MAX_CHANNELS]; servo_position_t pos; - fd = open(PWM_OUTPUT_DEVICE_PATH, O_RDWR); + fd = open(PWM_OUTPUT0_DEVICE_PATH, O_RDWR); if (fd < 0) { printf("failed opening /dev/pwm_servo\n"); -- cgit v1.2.3