Skip to content

Commit

Permalink
Correct the LeddarOne FOV and deprecate the unneeded _distance_sensor…
Browse files Browse the repository at this point in the history
…_topic after migrating to PX4RangeFinder.
  • Loading branch information
mcsauder authored and julianoes committed Sep 6, 2019
1 parent ddd9a97 commit aea139b
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions src/drivers/distance_sensor/leddar_one/leddar_one.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -168,8 +168,6 @@ class LeddarOne : public cdev::CDev, public px4::ScheduledWorkItem

perf_counter_t _comms_error{perf_alloc(PC_COUNT, "leddar_one_comms_error")};
perf_counter_t _sample_perf{perf_alloc(PC_ELAPSED, "leddar_one_sample")};

orb_advert_t _distance_sensor_topic{nullptr};
};

LeddarOne::LeddarOne(const char *device_path, const char *serial_port, uint8_t device_orientation):
Expand All @@ -182,20 +180,14 @@ LeddarOne::LeddarOne(const char *device_path, const char *serial_port, uint8_t d
_px4_rangefinder.set_device_type(distance_sensor_s::MAV_DISTANCE_SENSOR_LASER);
_px4_rangefinder.set_max_distance(LEDDAR_ONE_MAX_DISTANCE);
_px4_rangefinder.set_min_distance(LEDDAR_ONE_MIN_DISTANCE);
_px4_rangefinder.set_fov(0.008); // Divergence 8 mRadian
_px4_rangefinder.set_fov(0.105); // FOV cone angle of 6 degrees.
_px4_rangefinder.set_orientation(device_orientation);
}

LeddarOne::~LeddarOne()
{
stop();

free((char *)_serial_port);

if (_distance_sensor_topic) {
orb_unadvertise(_distance_sensor_topic);
}

perf_free(_comms_error);
perf_free(_sample_perf);
}
Expand Down

0 comments on commit aea139b

Please sign in to comment.