mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-03 06:28:27 -04:00
AP_RSSI: use fabsf instead of abs
resolves compiler warning
This commit is contained in:
parent
7af9892bd1
commit
6ef735c41e
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user