AC_Fence: add static create method
This commit is contained in:
parent
18aa88b329
commit
52686ec838
@ -35,9 +35,15 @@
|
|||||||
class AC_Fence
|
class AC_Fence
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
static AC_Fence create(const AP_AHRS &ahrs, const AP_InertialNav &inav) {
|
||||||
|
return AC_Fence{ahrs, inav};
|
||||||
|
}
|
||||||
|
|
||||||
/// Constructor
|
constexpr AC_Fence(AC_Fence &&other) = default;
|
||||||
AC_Fence(const AP_AHRS& ahrs, const AP_InertialNav& inav);
|
|
||||||
|
/* Do not allow copies */
|
||||||
|
AC_Fence(const AC_Fence &other) = delete;
|
||||||
|
AC_Fence &operator=(const AC_Fence&) = delete;
|
||||||
|
|
||||||
/// enable - allows fence to be enabled/disabled. Note: this does not update the eeprom saved value
|
/// enable - allows fence to be enabled/disabled. Note: this does not update the eeprom saved value
|
||||||
void enable(bool value);
|
void enable(bool value);
|
||||||
@ -117,6 +123,7 @@ public:
|
|||||||
static const struct AP_Param::GroupInfo var_info[];
|
static const struct AP_Param::GroupInfo var_info[];
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
AC_Fence(const AP_AHRS &ahrs, const AP_InertialNav &inav);
|
||||||
|
|
||||||
/// record_breach - update breach bitmask, time and count
|
/// record_breach - update breach bitmask, time and count
|
||||||
void record_breach(uint8_t fence_type);
|
void record_breach(uint8_t fence_type);
|
||||||
|
Loading…
Reference in New Issue
Block a user