mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-22 00:03:34 +08:00
geofence: make better use of Block class for updating parameters
This commit is contained in:
@@ -55,11 +55,13 @@
|
||||
#endif
|
||||
static const int ERROR = -1;
|
||||
|
||||
Geofence::Geofence() : _fence_pub(-1),
|
||||
Geofence::Geofence() :
|
||||
SuperBlock(NULL, "GF"),
|
||||
_fence_pub(-1),
|
||||
_altitude_min(0),
|
||||
_altitude_max(0),
|
||||
_verticesCount(0),
|
||||
param_geofence_on(NULL, "GF_ON", false)
|
||||
param_geofence_on(this, "ON")
|
||||
{
|
||||
/* Load initial params */
|
||||
updateParams();
|
||||
@@ -292,8 +294,3 @@ int Geofence::clearDm()
|
||||
{
|
||||
dm_clear(DM_KEY_FENCE_POINTS);
|
||||
}
|
||||
|
||||
void Geofence::updateParams()
|
||||
{
|
||||
param_geofence_on.update();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user