mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-28 17:53:34 +08:00
navigator: use new Param class
This commit is contained in:
@@ -43,9 +43,7 @@
|
||||
|
||||
#include <cfloat>
|
||||
|
||||
#include <controllib/blocks.hpp>
|
||||
#include <controllib/block/BlockParam.hpp>
|
||||
#include <controllib/blocks.hpp>
|
||||
#include <px4_module_params.h>
|
||||
#include <drivers/drv_hrt.h>
|
||||
#include <geo/geo.h>
|
||||
#include <px4_defines.h>
|
||||
@@ -57,7 +55,7 @@
|
||||
|
||||
class Navigator;
|
||||
|
||||
class Geofence : public control::SuperBlock
|
||||
class Geofence : public ModuleParams
|
||||
{
|
||||
public:
|
||||
Geofence(Navigator *navigator);
|
||||
@@ -159,13 +157,14 @@ private:
|
||||
|
||||
map_projection_reference_s _projection_reference = {}; ///< reference to convert (lon, lat) to local [m]
|
||||
|
||||
/* Params */
|
||||
control::BlockParamInt _param_action;
|
||||
control::BlockParamInt _param_altitude_mode;
|
||||
control::BlockParamInt _param_source;
|
||||
control::BlockParamInt _param_counter_threshold;
|
||||
control::BlockParamFloat _param_max_hor_distance;
|
||||
control::BlockParamFloat _param_max_ver_distance;
|
||||
DEFINE_PARAMETERS(
|
||||
(ParamInt<px4::params::GF_ACTION>) _param_action,
|
||||
(ParamInt<px4::params::GF_ALTMODE>) _param_altitude_mode,
|
||||
(ParamInt<px4::params::GF_SOURCE>) _param_source,
|
||||
(ParamInt<px4::params::GF_COUNT>) _param_counter_threshold,
|
||||
(ParamFloat<px4::params::GF_MAX_HOR_DIST>) _param_max_hor_distance,
|
||||
(ParamFloat<px4::params::GF_MAX_VER_DIST>) _param_max_ver_distance
|
||||
)
|
||||
|
||||
int _outside_counter{0};
|
||||
uint16_t _update_counter{0}; ///< dataman update counter: if it does not match, we polygon data was updated
|
||||
|
||||
Reference in New Issue
Block a user