Merge pull request #2510 from mcharleb/fabsf-fix

Chage use of fabsf for int to abs
This commit is contained in:
Lorenz Meier
2015-07-02 01:34:48 +02:00
+1 -1
View File
@@ -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;