AP_Proximity: fixed incorrect use of fabs()

This commit is contained in:
Andrew Tridgell 2019-10-01 08:26:24 +10:00
parent 0b1cbc7bde
commit 5a25d5c42d
1 changed files with 1 additions and 1 deletions

View File

@ -101,7 +101,7 @@ void AP_Proximity_MAV::handle_msg(const mavlink_message_t &msg)
} }
const float MAX_DISTANCE = 9999.0f; const float MAX_DISTANCE = 9999.0f;
const uint8_t total_distances = MIN(((360.0f / fabs(increment)) + 0.5f), MAVLINK_MSG_OBSTACLE_DISTANCE_FIELD_DISTANCES_LEN); // usually 72 const uint8_t total_distances = MIN(((360.0f / fabsf(increment)) + 0.5f), MAVLINK_MSG_OBSTACLE_DISTANCE_FIELD_DISTANCES_LEN); // usually 72
// set distance min and max // set distance min and max
_distance_min = packet.min_distance * 0.01f; _distance_min = packet.min_distance * 0.01f;