mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-03 06:28:27 -04:00
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
This commit is contained in:
parent
f326377a5c
commit
c618a27ee0
@ -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<mavlink_statustext_t> _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;
|
||||
|
Loading…
Reference in New Issue
Block a user