mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-27 11:08:29 -04:00
AP_RangeFinder: Delete unnecessary judgment
This commit is contained in:
parent
3a4cbdd41f
commit
49b0a00182
@ -108,7 +108,7 @@ void AP_RangeFinder_analog::update(void)
|
||||
} else {
|
||||
dist_m = scaling / (v - offset);
|
||||
}
|
||||
if (isinf(dist_m) || dist_m > _max_distance_cm * 0.01f) {
|
||||
if (dist_m > _max_distance_cm * 0.01f) {
|
||||
dist_m = _max_distance_cm * 0.01f;
|
||||
}
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user