AP_RSSI: convert floating point divides into multiplys

This commit is contained in:
Henry Wurzburg 2022-03-11 19:03:13 -06:00 committed by Andrew Tridgell
parent 6ebefbdb16
commit c48b7319bc
1 changed files with 1 additions and 1 deletions

View File

@ -141,7 +141,7 @@ float AP_RSSI::read_receiver_rssi()
case RssiType::RECEIVER: {
int16_t rssi = RC_Channels::get_receiver_rssi();
if (rssi != -1) {
return rssi / 255.0;
return rssi * (1/255.0);
}
return 0.0f;
}