Convert geofence distance params to float (#5435)

This commit is contained in:
Nate Weibley
2016-09-02 11:49:53 -04:00
committed by Daniel Agar
parent ced33e982b
commit 686fd5b125
2 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -134,8 +134,8 @@ bool Geofence::inside(const struct vehicle_global_position_s &global_position,
bool Geofence::inside(double lat, double lon, float altitude)
{
int32_t max_horizontal_distance = _param_max_hor_distance.get();
int32_t max_vertical_distance = _param_max_ver_distance.get();
float max_horizontal_distance = _param_max_hor_distance.get();
float max_vertical_distance = _param_max_ver_distance.get();
if (max_horizontal_distance > 0 || max_vertical_distance > 0) {
if (_home_pos_set) {
+2 -2
View File
@@ -114,7 +114,7 @@ PARAM_DEFINE_INT32(GF_COUNT, -1);
* @increment 1
* @group Geofence
*/
PARAM_DEFINE_INT32(GF_MAX_HOR_DIST, -1);
PARAM_DEFINE_FLOAT(GF_MAX_HOR_DIST, -1);
/**
* Max vertical distance in meters.
@@ -126,4 +126,4 @@ PARAM_DEFINE_INT32(GF_MAX_HOR_DIST, -1);
* @increment 1
* @group Geofence
*/
PARAM_DEFINE_INT32(GF_MAX_VER_DIST, -1);
PARAM_DEFINE_FLOAT(GF_MAX_VER_DIST, -1);