mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-03 14:38:30 -04:00
AC_Fence: add static create method
This commit is contained in:
parent
18aa88b329
commit
52686ec838
@ -35,9 +35,15 @@
|
||||
class AC_Fence
|
||||
{
|
||||
public:
|
||||
static AC_Fence create(const AP_AHRS &ahrs, const AP_InertialNav &inav) {
|
||||
return AC_Fence{ahrs, inav};
|
||||
}
|
||||
|
||||
/// Constructor
|
||||
AC_Fence(const AP_AHRS& ahrs, const AP_InertialNav& inav);
|
||||
constexpr AC_Fence(AC_Fence &&other) = default;
|
||||
|
||||
/* 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
|
||||
void enable(bool value);
|
||||
@ -117,6 +123,7 @@ public:
|
||||
static const struct AP_Param::GroupInfo var_info[];
|
||||
|
||||
private:
|
||||
AC_Fence(const AP_AHRS &ahrs, const AP_InertialNav &inav);
|
||||
|
||||
/// record_breach - update breach bitmask, time and count
|
||||
void record_breach(uint8_t fence_type);
|
||||
|
Loading…
Reference in New Issue
Block a user