mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-24 04:23:33 +08:00
Geofence: remove GF_COUNT
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
This commit is contained in:
committed by
Daniel Agar
parent
fd709e05b0
commit
563bfbf6e7
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user