Geofence: remove GF_COUNT

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
This commit is contained in:
Silvan Fuhrer
2023-11-22 21:45:02 -05:00
committed by Daniel Agar
parent fd709e05b0
commit 563bfbf6e7
3 changed files with 3 additions and 27 deletions
+2 -14
View File
@@ -259,20 +259,8 @@ bool Geofence::checkAll(double lat, double lon, float altitude)
// as they both report being inside when not enabled
inside_fence = inside_fence && isInsidePolygonOrCircle(lat, lon, altitude);
if (inside_fence) {
_outside_counter = 0;
return inside_fence;
} else {
_outside_counter++;
if (_outside_counter > _param_gf_count.get()) {
return inside_fence;
} else {
return true;
}
}
return inside_fence;
}
}
bool Geofence::check(const vehicle_global_position_s &global_position, const sensor_gps_s &gps_position)