diff options
Diffstat (limited to 'src/systemcmds/tests/test_servo.c')
-rw-r--r-- | src/systemcmds/tests/test_servo.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/systemcmds/tests/test_servo.c b/src/systemcmds/tests/test_servo.c index ba6848522..9ffd83c65 100644 --- a/src/systemcmds/tests/test_servo.c +++ b/src/systemcmds/tests/test_servo.c @@ -81,6 +81,7 @@ int test_servo(int argc, char *argv[]) unsigned servo_count; result = ioctl(fd, PWM_SERVO_GET_COUNT, (unsigned long)&servo_count); + if (result != OK) { warnx("PWM_SERVO_GET_COUNT"); return ERROR; @@ -100,12 +101,17 @@ int test_servo(int argc, char *argv[]) /* tell safety that its ok to disable it with the switch */ result = ioctl(fd, PWM_SERVO_SET_ARM_OK, 0); - if (result != OK) + + if (result != OK) { warnx("FAIL: PWM_SERVO_SET_ARM_OK"); + } + /* tell output device that the system is armed (it will output values if safety is off) */ result = ioctl(fd, PWM_SERVO_ARM, 0); - if (result != OK) + + if (result != OK) { warnx("FAIL: PWM_SERVO_ARM"); + } usleep(5000000); printf("Advancing channel 0 to 1500\n"); |