mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-16 06:53:33 +08:00
Merge pull request #2510 from mcharleb/fabsf-fix
Chage use of fabsf for int to abs
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user