review comments
This commit is contained in:
Martina Rivizzigno
2019-07-11 13:20:27 +02:00
committed by Beat Küng
parent ac67d5603f
commit 1fb80612f3
3 changed files with 2 additions and 3 deletions

View File

@@ -27,4 +27,4 @@ uint8 ROTATION_CUSTOM =100 # MAV_SENSOR_ROTATION_CUSTOM
float32 h_fov # Sensor horizontal field of view (rad)
float32 v_fov # Sensor vertical field of view (rad)
float32[4] q # Quaterion sensor orientation to specify the orientation ROTATION_CUSTOM
float32[4] q # Quaterion sensor orientation with respect to the vehicle body frame to specify the orientation ROTATION_CUSTOM

View File

@@ -22,6 +22,5 @@ parameters:
0: ROTATION_FORWARD_FACING
6: ROTATION_LEFT_FACING
2: ROTATION_RIGHT_FACING
100: ROTATION_CUSTOM
reboot_required: true
default: 25

View File

@@ -126,7 +126,7 @@ void CollisionPrevention::_updateDistanceSensor(obstacle_distance_s &obstacle)
obstacle.timestamp = distance_sensor.timestamp;
obstacle.max_distance = distance_sensor.max_distance * 100; // convert to cm
obstacle.min_distance = distance_sensor.min_distance * 100; // convert to cm
memset(&obstacle.distances[0], UINT16_MAX, sizeof(obstacle.distances));
memset(&obstacle.distances[0], 0xff, sizeof(obstacle.distances));
obstacle.increment = math::degrees(distance_sensor.h_fov);
obstacle.angle_offset = 0.f;
}