mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-03 14:38:30 -04:00
AP_OpticalFlow: add static create method
This commit is contained in:
parent
eed3c83079
commit
04c3dca3ce
@ -30,8 +30,13 @@ class OpticalFlow
|
||||
friend class OpticalFlow_backend;
|
||||
|
||||
public:
|
||||
// constructor
|
||||
OpticalFlow(AP_AHRS_NavEKF& ahrs);
|
||||
static OpticalFlow create(AP_AHRS_NavEKF& ahrs) { return OpticalFlow{ahrs}; }
|
||||
|
||||
constexpr OpticalFlow(OpticalFlow &&other) = default;
|
||||
|
||||
/* Do not allow copies */
|
||||
OpticalFlow(const OpticalFlow &other) = delete;
|
||||
OpticalFlow &operator=(const OpticalFlow&) = delete;
|
||||
|
||||
// init - initialise sensor
|
||||
void init(void);
|
||||
@ -76,6 +81,8 @@ public:
|
||||
static const struct AP_Param::GroupInfo var_info[];
|
||||
|
||||
private:
|
||||
OpticalFlow(AP_AHRS_NavEKF& ahrs);
|
||||
|
||||
AP_AHRS_NavEKF &_ahrs;
|
||||
OpticalFlow_backend *backend;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user