diff --git a/src/lib/collision_prevention/CollisionPrevention.cpp b/src/lib/collision_prevention/CollisionPrevention.cpp index c72a490d0082..1a135fe256c0 100644 --- a/src/lib/collision_prevention/CollisionPrevention.cpp +++ b/src/lib/collision_prevention/CollisionPrevention.cpp @@ -44,7 +44,7 @@ using namespace matrix; namespace { -static constexpr int INTERNAL_MAP_INCREMENT_DEG = 10; //cannot be lower than 5 degrees, should divide 360 evenly +static constexpr int INTERNAL_MAP_INCREMENT_DEG = 5; //cannot be lower than 5 degrees, should divide 360 evenly static constexpr int INTERNAL_MAP_USED_BINS = 360 / INTERNAL_MAP_INCREMENT_DEG; static float wrap_360(float f) @@ -313,7 +313,7 @@ CollisionPrevention::_addDistanceSensorData(distance_sensor_s &distance_sensor, // negative values indicate out of range but valid measurements. if (fabsf(distance_sensor.current_distance - -1.f) < FLT_EPSILON && distance_sensor.signal_quality == 0) { - distance_reading = distance_sensor.max_distance; + distance_reading = distance_sensor.max_distance + 1; } // discard values below min range