diff --git a/libraries/AP_InertialSensor/AP_InertialSensor.h b/libraries/AP_InertialSensor/AP_InertialSensor.h index 63706ac849..f43d389e10 100644 --- a/libraries/AP_InertialSensor/AP_InertialSensor.h +++ b/libraries/AP_InertialSensor/AP_InertialSensor.h @@ -49,9 +49,7 @@ class AP_InertialSensor : AP_AccelCal_Client friend class AP_InertialSensor_Backend; public: - static AP_InertialSensor create() { return AP_InertialSensor{}; } - - constexpr AP_InertialSensor(AP_InertialSensor &&other) = default; + AP_InertialSensor(); /* Do not allow copies */ AP_InertialSensor(const AP_InertialSensor &other) = delete; @@ -346,8 +344,6 @@ public: BatchSampler batchsampler{*this}; private: - AP_InertialSensor(); - // load backend drivers bool _add_backend(AP_InertialSensor_Backend *backend); void _start_backends(); diff --git a/libraries/AP_InertialSensor/examples/INS_generic/INS_generic.cpp b/libraries/AP_InertialSensor/examples/INS_generic/INS_generic.cpp index 1a0248ca76..a6f338b8a8 100644 --- a/libraries/AP_InertialSensor/examples/INS_generic/INS_generic.cpp +++ b/libraries/AP_InertialSensor/examples/INS_generic/INS_generic.cpp @@ -8,13 +8,13 @@ const AP_HAL::HAL &hal = AP_HAL::get_HAL(); -static AP_InertialSensor ins = AP_InertialSensor::create(); +static AP_InertialSensor ins; static void display_offsets_and_scaling(); static void run_test(); // board specific config -static AP_BoardConfig BoardConfig = AP_BoardConfig::create(); +static AP_BoardConfig BoardConfig; void setup(void); void loop(void);