From c48b7319bc848ca28d88770dbc16543a27c2e7fa Mon Sep 17 00:00:00 2001 From: Henry Wurzburg Date: Fri, 11 Mar 2022 19:03:13 -0600 Subject: [PATCH] AP_RSSI: convert floating point divides into multiplys --- libraries/AP_RSSI/AP_RSSI.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/AP_RSSI/AP_RSSI.cpp b/libraries/AP_RSSI/AP_RSSI.cpp index 105da81a59..594317fe8b 100644 --- a/libraries/AP_RSSI/AP_RSSI.cpp +++ b/libraries/AP_RSSI/AP_RSSI.cpp @@ -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; }