From 703a1ba438231e71bb5a5db621fabaf4acd9af70 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sun, 5 May 2013 15:02:51 +1000 Subject: [PATCH] Copter: avoid copying the DCM matrix --- ArduCopter/test.pde | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ArduCopter/test.pde b/ArduCopter/test.pde index 3804fbe1ae..75ac025c35 100644 --- a/ArduCopter/test.pde +++ b/ArduCopter/test.pde @@ -475,7 +475,7 @@ test_mag(uint8_t argc, const Menu::arg *argv) if(medium_loopCounter == 5) { if (compass.read()) { // Calculate heading - Matrix3f m = ahrs.get_dcm_matrix(); + const Matrix3f &m = ahrs.get_dcm_matrix(); heading = compass.calculate_heading(m); compass.null_offsets(); }