Definition at line 82 of file sf1xx.cpp.
◆ SF1XX()
◆ ~SF1XX()
◆ collect()
Definition at line 469 of file sf1xx.cpp.
References _comms_errors, _distance_sensor_topic, _reports, _rotation, _sample_perf, distance_sensor_s::current_distance, f(), get_maximum_distance(), get_minimum_distance(), hrt_absolute_time(), distance_sensor_s::id, distance_sensor_s::max_distance, distance_sensor_s::min_distance, OK, ORB_ID, orb_publish(), distance_sensor_s::orientation, perf_begin(), perf_count(), perf_end(), distance_sensor_s::signal_quality, distance_sensor_s::timestamp, distance_sensor_s::type, and distance_sensor_s::variance.
Referenced by read(), and Run().
◆ get_maximum_distance()
float SF1XX::get_maximum_distance |
( |
| ) |
|
|
private |
◆ get_minimum_distance()
float SF1XX::get_minimum_distance |
( |
| ) |
|
|
private |
◆ init()
Definition at line 200 of file sf1xx.cpp.
References _class_instance, _conversion_interval, _distance_sensor_topic, _max_distance, _min_distance, _orb_class_instance, _reports, _sensor_ok, ToneAlarmInterface::init(), measure(), OK, orb_advertise_multi(), ORB_ID, ORB_PRIO_HIGH, param_find(), param_get(), RANGE_FINDER_BASE_DEVICE_PATH, and SF1XX_BASEADDR.
Referenced by sf1xx::start_bus().
◆ ioctl()
int SF1XX::ioctl |
( |
device::file_t * |
filp, |
|
|
int |
cmd, |
|
|
unsigned long |
arg |
|
) |
| |
|
override |
◆ measure()
◆ print_info()
void SF1XX::print_info |
( |
| ) |
|
◆ probe()
◆ probe_address()
int SF1XX::probe_address |
( |
uint8_t |
address | ) |
|
|
private |
Test whether the device supported by the driver is present at a specific address.
- Parameters
-
address | The I2C bus address to probe. |
- Returns
- True if the device is present.
◆ read()
ssize_t SF1XX::read |
( |
device::file_t * |
filp, |
|
|
char * |
buffer, |
|
|
size_t |
buflen |
|
) |
| |
|
override |
◆ Run()
◆ set_maximum_distance()
void SF1XX::set_maximum_distance |
( |
float |
max | ) |
|
|
private |
◆ set_minimum_distance()
void SF1XX::set_minimum_distance |
( |
float |
min | ) |
|
|
private |
Set the min and max distance thresholds if you want the end points of the sensors range to be brought in at all, otherwise it will use the defaults SF1XX_MIN_DISTANCE and SF1XX_MAX_DISTANCE.
Definition at line 301 of file sf1xx.cpp.
References _min_distance, and math::min().
◆ start()
Initialise the automatic measurement state machine and start it.
- Note
- This function is called at open and error time. It might make sense to make it more aggressive about resetting the bus in case of errors.
Definition at line 518 of file sf1xx.cpp.
References _conversion_interval, _reports, and measure().
Referenced by ioctl(), and Run().
◆ stop()
Stop the automatic measurement state machine.
Definition at line 531 of file sf1xx.cpp.
Referenced by ~SF1XX().
◆ _class_instance
int SF1XX::_class_instance {-1} |
|
private |
◆ _comms_errors
◆ _conversion_interval
int SF1XX::_conversion_interval {-1} |
|
private |
◆ _distance_sensor_topic
◆ _max_distance
float SF1XX::_max_distance {-1.0f} |
|
private |
◆ _measure_interval
int SF1XX::_measure_interval {0} |
|
private |
◆ _min_distance
float SF1XX::_min_distance {-1.0f} |
|
private |
◆ _orb_class_instance
int SF1XX::_orb_class_instance {-1} |
|
private |
◆ _reports
ringbuffer::RingBuffer* SF1XX::_reports {nullptr} |
|
private |
◆ _rotation
uint8_t SF1XX::_rotation {0} |
|
private |
◆ _sample_perf
◆ _sensor_ok
bool SF1XX::_sensor_ok {false} |
|
private |
The documentation for this class was generated from the following file: