mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-03 14:38:30 -04:00
AP_LandingGear: add static create method
This commit is contained in:
parent
31db77e47b
commit
beabccf9ef
@ -11,8 +11,14 @@
|
|||||||
/// @class AP_LandingGear
|
/// @class AP_LandingGear
|
||||||
/// @brief Class managing the control of landing gear
|
/// @brief Class managing the control of landing gear
|
||||||
class AP_LandingGear {
|
class AP_LandingGear {
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
static AP_LandingGear create() { return AP_LandingGear{}; }
|
||||||
|
|
||||||
|
constexpr AP_LandingGear(AP_LandingGear &&other) = default;
|
||||||
|
|
||||||
|
/* Do not allow copies */
|
||||||
|
AP_LandingGear(const AP_LandingGear &other) = delete;
|
||||||
|
AP_LandingGear &operator=(const AP_LandingGear&) = delete;
|
||||||
|
|
||||||
// Gear command modes
|
// Gear command modes
|
||||||
enum LandingGearCommand {
|
enum LandingGearCommand {
|
||||||
@ -28,13 +34,6 @@ public:
|
|||||||
LandingGear_Startup_Deploy = 2,
|
LandingGear_Startup_Deploy = 2,
|
||||||
};
|
};
|
||||||
|
|
||||||
/// Constructor
|
|
||||||
AP_LandingGear()
|
|
||||||
{
|
|
||||||
// setup parameter defaults
|
|
||||||
AP_Param::setup_object_defaults(this, var_info);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// initialise state of landing gear
|
/// initialise state of landing gear
|
||||||
void init();
|
void init();
|
||||||
|
|
||||||
@ -47,6 +46,10 @@ public:
|
|||||||
static const struct AP_Param::GroupInfo var_info[];
|
static const struct AP_Param::GroupInfo var_info[];
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
AP_LandingGear() {
|
||||||
|
// setup parameter defaults
|
||||||
|
AP_Param::setup_object_defaults(this, var_info);
|
||||||
|
}
|
||||||
|
|
||||||
// Parameters
|
// Parameters
|
||||||
AP_Int16 _servo_retract_pwm; // PWM value to move servo to when gear is retracted
|
AP_Int16 _servo_retract_pwm; // PWM value to move servo to when gear is retracted
|
||||||
|
Loading…
Reference in New Issue
Block a user