From c618a27ee07cf8d4518bb2968a5c7536e68fd269 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Wed, 13 Dec 2017 12:06:12 +1100 Subject: [PATCH] AP_Frsky_Telem: removed create() method for objects See discussion here: https://github.com/ArduPilot/ardupilot/issues/7331 we were getting some uninitialised variables. While it only showed up in AP_SbusOut, it means we can't be sure it won't happen on other objects, so safest to remove the approach Thanks to assistance from Lucas, Peter and Francisco --- libraries/AP_Frsky_Telem/AP_Frsky_Telem.h | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/libraries/AP_Frsky_Telem/AP_Frsky_Telem.h b/libraries/AP_Frsky_Telem/AP_Frsky_Telem.h index 3c291bc225..5de86760a3 100644 --- a/libraries/AP_Frsky_Telem/AP_Frsky_Telem.h +++ b/libraries/AP_Frsky_Telem/AP_Frsky_Telem.h @@ -113,11 +113,7 @@ for FrSky SPort Passthrough class AP_Frsky_Telem { public: - static AP_Frsky_Telem create(AP_AHRS &ahrs, const AP_BattMonitor &battery, const RangeFinder &rng) { - return AP_Frsky_Telem{ahrs, battery, rng}; - } - - constexpr AP_Frsky_Telem(AP_Frsky_Telem &&other) = default; + AP_Frsky_Telem(AP_AHRS &ahrs, const AP_BattMonitor &battery, const RangeFinder &rng); /* Do not allow copies */ AP_Frsky_Telem(const AP_Frsky_Telem &other) = delete; @@ -146,8 +142,6 @@ public: static ObjectArray _statustext_queue; private: - AP_Frsky_Telem(AP_AHRS &ahrs, const AP_BattMonitor &battery, const RangeFinder &rng); - AP_AHRS &_ahrs; const AP_BattMonitor &_battery; const RangeFinder &_rng;