mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-23 22:03:33 +08:00
navigator: use new Param class
This commit is contained in:
@@ -41,15 +41,17 @@
|
||||
#ifndef NAVIGATOR_RTL_H
|
||||
#define NAVIGATOR_RTL_H
|
||||
|
||||
#include <px4_module_params.h>
|
||||
|
||||
#include "navigator_mode.h"
|
||||
#include "mission_block.h"
|
||||
|
||||
class Navigator;
|
||||
|
||||
class RTL final : public MissionBlock
|
||||
class RTL : public MissionBlock, public ModuleParams
|
||||
{
|
||||
public:
|
||||
RTL(Navigator *navigator, const char *name);
|
||||
RTL(Navigator *navigator);
|
||||
~RTL() = default;
|
||||
|
||||
void on_inactive() override;
|
||||
@@ -84,11 +86,13 @@ private:
|
||||
|
||||
bool _rtl_alt_min{false};
|
||||
|
||||
control::BlockParamFloat _param_return_alt;
|
||||
control::BlockParamFloat _param_descend_alt;
|
||||
control::BlockParamFloat _param_land_delay;
|
||||
control::BlockParamFloat _param_rtl_min_dist;
|
||||
control::BlockParamInt _param_rtl_land_type;
|
||||
DEFINE_PARAMETERS(
|
||||
(ParamFloat<px4::params::RTL_RETURN_ALT>) _param_return_alt,
|
||||
(ParamFloat<px4::params::RTL_DESCEND_ALT>) _param_descend_alt,
|
||||
(ParamFloat<px4::params::RTL_LAND_DELAY>) _param_land_delay,
|
||||
(ParamFloat<px4::params::RTL_MIN_DIST>) _param_rtl_min_dist,
|
||||
(ParamInt<px4::params::RTL_LAND_TYPE>) _param_rtl_land_type
|
||||
)
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user