Browse Source

Merge pull request #2510 from mcharleb/fabsf-fix

Chage use of fabsf for int to abs
sbg
Lorenz Meier 10 years ago
parent
commit
02850e0d16
  1. 2
      src/systemcmds/tests/test_ppm_loopback.c

2
src/systemcmds/tests/test_ppm_loopback.c

@ -161,7 +161,7 @@ int test_ppm_loopback(int argc, char *argv[]) @@ -161,7 +161,7 @@ int test_ppm_loopback(int argc, char *argv[])
/* go and check values */
for (unsigned i = 0; (i < servo_count) && (i < sizeof(pwm_values) / sizeof(pwm_values[0])); i++) {
if (fabsf(rc_input.values[i] - pwm_values[i]) > 10) {
if (abs(rc_input.values[i] - pwm_values[i]) > 10) {
warnx("comparison fail: RC: %d, expected: %d", rc_input.values[i], pwm_values[i]);
(void)close(servo_fd);
return ERROR;

Loading…
Cancel
Save