From acbeb29fbe61f8da55078e3117faa2e703d0e615 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 30 Aug 2016 11:28:47 +1000 Subject: [PATCH] AP_Frsky_Telem: use const references where possible save some stack space --- libraries/AP_Frsky_Telem/AP_Frsky_Telem.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libraries/AP_Frsky_Telem/AP_Frsky_Telem.cpp b/libraries/AP_Frsky_Telem/AP_Frsky_Telem.cpp index 6a57f9ca98..44dfe10c86 100644 --- a/libraries/AP_Frsky_Telem/AP_Frsky_Telem.cpp +++ b/libraries/AP_Frsky_Telem/AP_Frsky_Telem.cpp @@ -617,7 +617,7 @@ uint32_t AP_Frsky_Telem::calc_gps_status(void) // GPS vertical dilution of precision in dm gps_status |= prep_number(roundf(_ahrs.get_gps().get_vdop() * 0.1f),2,1)<= 3) { - Location loc = _ahrs.get_gps().location(); //get gps instance 0 + const Location &loc = _ahrs.get_gps().location(); //get gps instance 0 lat = format_gps(fabsf(loc.lat/10000000.0f)); _gps.latdddmm = lat; _gps.latmmmm = (lat - _gps.latdddmm) * 10000;