AP_SerialManager: add static create method
This commit is contained in:
parent
fbe0d9761c
commit
04866e9f76
@ -71,9 +71,7 @@
|
||||
|
||||
|
||||
class AP_SerialManager {
|
||||
|
||||
public:
|
||||
|
||||
enum SerialProtocol {
|
||||
SerialProtocol_None = -1,
|
||||
SerialProtocol_Console = 0, // unused
|
||||
@ -92,8 +90,13 @@ public:
|
||||
SerialProtocol_Beacon = 13
|
||||
};
|
||||
|
||||
// Constructor
|
||||
AP_SerialManager();
|
||||
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();
|
||||
@ -130,6 +133,7 @@ public:
|
||||
static const struct AP_Param::GroupInfo var_info[];
|
||||
|
||||
private:
|
||||
AP_SerialManager();
|
||||
|
||||
// array of uart info
|
||||
struct {
|
||||
|
Loading…
Reference in New Issue
Block a user