AP_Baro: add static create method
This commit is contained in:
parent
c34104b369
commit
c5c1d5abfe
@ -24,8 +24,13 @@ class AP_Baro
|
||||
friend class AP_Baro_SITL; // for access to sensors[]
|
||||
|
||||
public:
|
||||
// constructor
|
||||
AP_Baro();
|
||||
static AP_Baro create() { return AP_Baro{}; }
|
||||
|
||||
constexpr AP_Baro(AP_Baro &&other) = default;
|
||||
|
||||
/* Do not allow copies */
|
||||
AP_Baro(const AP_Baro &other) = delete;
|
||||
AP_Baro &operator=(const AP_Baro&) = delete;
|
||||
|
||||
// barometer types
|
||||
typedef enum {
|
||||
@ -159,8 +164,10 @@ public:
|
||||
|
||||
// set a pressure correction from AP_TempCalibration
|
||||
void set_pressure_correction(uint8_t instance, float p_correction);
|
||||
|
||||
|
||||
private:
|
||||
AP_Baro();
|
||||
|
||||
// how many drivers do we have?
|
||||
uint8_t _num_drivers;
|
||||
AP_Baro_Backend *drivers[BARO_MAX_DRIVERS];
|
||||
|
Loading…
Reference in New Issue
Block a user