AP_RSSI: add static create method

This commit is contained in:
Lucas De Marchi 2017-08-29 16:47:23 -07:00 committed by Francisco Ferreira
parent 4f42facefc
commit b09e0c3261

View File

@ -28,11 +28,16 @@ public:
RSSI_RECEIVER = 3
};
// constructor
AP_RSSI();
static AP_RSSI create() { return AP_RSSI{}; }
constexpr AP_RSSI(AP_RSSI &&other) = default;
/* Do not allow copies */
AP_RSSI(const AP_RSSI &other) = delete;
AP_RSSI &operator=(const AP_RSSI&) = delete;
// destructor
~AP_RSSI(void);
~AP_RSSI(void);
// Initialize the rssi object and prepare it for use
void init();
@ -52,6 +57,7 @@ public:
static const struct AP_Param::GroupInfo var_info[];
private:
AP_RSSI();
// RSSI parameters
AP_Int8 rssi_type; // Type of RSSI being used