diff --git a/libraries/AP_L1_Control/AP_L1_Control.h b/libraries/AP_L1_Control/AP_L1_Control.h index 61f75776a8..21f7e6645c 100644 --- a/libraries/AP_L1_Control/AP_L1_Control.h +++ b/libraries/AP_L1_Control/AP_L1_Control.h @@ -21,12 +21,13 @@ class AP_L1_Control : public AP_Navigation { public: - static AP_L1_Control create(AP_AHRS &ahrs, const AP_SpdHgtControl *spdHgtControl) { - return AP_L1_Control{ahrs, spdHgtControl}; + AP_L1_Control(AP_AHRS &ahrs, const AP_SpdHgtControl *spdHgtControl) + : _ahrs(ahrs) + , _spdHgtControl(spdHgtControl) + { + AP_Param::setup_object_defaults(this, var_info); } - constexpr AP_L1_Control(AP_L1_Control &&other) = default; - /* Do not allow copies */ AP_L1_Control(const AP_L1_Control &other) = delete; AP_L1_Control &operator=(const AP_L1_Control&) = delete; @@ -75,13 +76,6 @@ public: } private: - AP_L1_Control(AP_AHRS &ahrs, const AP_SpdHgtControl *spdHgtControl) - : _ahrs(ahrs) - , _spdHgtControl(spdHgtControl) - { - AP_Param::setup_object_defaults(this, var_info); - } - // reference to the AHRS object AP_AHRS &_ahrs;