mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-24 01:28:29 -04:00
AP_InertialSensor: add static create method
This commit is contained in:
parent
c1a957fbf3
commit
d566567d87
@ -46,7 +46,13 @@ class AP_InertialSensor : AP_AccelCal_Client
|
||||
friend class AP_InertialSensor_Backend;
|
||||
|
||||
public:
|
||||
AP_InertialSensor();
|
||||
static AP_InertialSensor create() { return AP_InertialSensor{}; }
|
||||
|
||||
constexpr AP_InertialSensor(AP_InertialSensor &&other) = default;
|
||||
|
||||
/* Do not allow copies */
|
||||
AP_InertialSensor(const AP_InertialSensor &other) = delete;
|
||||
AP_InertialSensor &operator=(const AP_InertialSensor&) = delete;
|
||||
|
||||
static AP_InertialSensor *get_instance();
|
||||
|
||||
@ -263,6 +269,7 @@ public:
|
||||
uint32_t get_last_update_usec(void) const { return _last_update_usec; }
|
||||
|
||||
private:
|
||||
AP_InertialSensor();
|
||||
|
||||
// load backend drivers
|
||||
bool _add_backend(AP_InertialSensor_Backend *backend);
|
||||
|
Loading…
Reference in New Issue
Block a user