mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-02-28 02:33:58 -04:00
AP_Rally: add static create method
This commit is contained in:
parent
c6eb48009b
commit
2f2abc2924
@ -35,9 +35,16 @@ struct PACKED RallyLocation {
|
||||
/// @class AP_Rally
|
||||
/// @brief Object managing Rally Points
|
||||
class AP_Rally {
|
||||
|
||||
public:
|
||||
AP_Rally(AP_AHRS &ahrs);
|
||||
static AP_Rally create(AP_AHRS &ahrs) {
|
||||
return AP_Rally{ahrs};
|
||||
}
|
||||
|
||||
constexpr AP_Rally(AP_Rally &&other) = default;
|
||||
|
||||
/* Do not allow copies */
|
||||
AP_Rally(const AP_Rally &other) = delete;
|
||||
AP_Rally &operator=(const AP_Rally&) = delete;
|
||||
|
||||
// data handling
|
||||
bool get_rally_point_with_index(uint8_t i, RallyLocation &ret) const;
|
||||
@ -59,6 +66,9 @@ public:
|
||||
// parameter block
|
||||
static const struct AP_Param::GroupInfo var_info[];
|
||||
|
||||
protected:
|
||||
AP_Rally(AP_AHRS &ahrs);
|
||||
|
||||
private:
|
||||
virtual bool is_valid(const Location &rally_point) const { return true; }
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user