AP_RSSI: use fabsf instead of abs

resolves compiler warning
This commit is contained in:
Randy Mackay 2016-04-23 09:37:06 +09:00 committed by Tom Pittenger
parent 7af9892bd1
commit 6ef735c41e

View File

@ -183,7 +183,7 @@ float AP_RSSI::scale_and_constrain_float_rssi(float current_rssi_value, float lo
if (range_is_inverted)
{
// Swap values so we can treat them as low->high uniformly in the code that follows
current_rssi_value = high_rssi_range + abs(current_rssi_value - low_rssi_range);
current_rssi_value = high_rssi_range + fabsf(current_rssi_value - low_rssi_range);
std::swap(low_rssi_range, high_rssi_range);
}