mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-02-21 23:33:57 -04:00
AP_SerialManager: 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
580af4a69a
commit
dd489a0797
@ -81,6 +81,12 @@
|
||||
|
||||
class AP_SerialManager {
|
||||
public:
|
||||
AP_SerialManager();
|
||||
|
||||
/* Do not allow copies */
|
||||
AP_SerialManager(const AP_SerialManager &other) = delete;
|
||||
AP_SerialManager &operator=(const AP_SerialManager&) = delete;
|
||||
|
||||
enum SerialProtocol {
|
||||
SerialProtocol_None = -1,
|
||||
SerialProtocol_Console = 0, // unused
|
||||
@ -106,14 +112,6 @@ public:
|
||||
return _instance;
|
||||
}
|
||||
|
||||
static AP_SerialManager create() { return AP_SerialManager{}; }
|
||||
|
||||
constexpr AP_SerialManager(AP_SerialManager &&other) = default;
|
||||
|
||||
/* Do not allow copies */
|
||||
AP_SerialManager(const AP_SerialManager &other) = delete;
|
||||
AP_SerialManager &operator=(const AP_SerialManager&) = delete;
|
||||
|
||||
// init_console - initialise console at default baud rate
|
||||
void init_console();
|
||||
|
||||
@ -149,8 +147,6 @@ public:
|
||||
static const struct AP_Param::GroupInfo var_info[];
|
||||
|
||||
private:
|
||||
AP_SerialManager();
|
||||
|
||||
static AP_SerialManager *_instance;
|
||||
|
||||
// array of uart info
|
||||
|
Loading…
Reference in New Issue
Block a user