mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-28 20:53:37 +08:00
Drivers: Distance Sensors: Add proper device IDs
Add new DeviceBusType_SERIAL to Device::DeviceId union Add DRV_DIST_DEVTYPE's for all distance sensors Change distance_sensor_s.id to distance_sensor_s.device_id Modify all distance_sensor drivers to apply 'proper' device_id
This commit is contained in:
committed by
Daniel Agar
parent
adf2d2f73a
commit
85796fbd84
@@ -48,8 +48,10 @@
|
||||
|
||||
SRF05::SRF05(const uint8_t rotation) :
|
||||
ScheduledWorkItem(MODULE_NAME, px4::wq_configurations::hp_default),
|
||||
_px4_rangefinder(0 /* device id not yet used */, rotation)
|
||||
_px4_rangefinder(0 /* no device type for GPIO input */, rotation)
|
||||
{
|
||||
_px4_rangefinder.set_device_type(DRV_DIST_DEVTYPE_SRF05);
|
||||
_px4_rangefinder.set_rangefinder_type(distance_sensor_s::MAV_DISTANCE_SENSOR_ULTRASOUND);
|
||||
_px4_rangefinder.set_min_distance(HXSRX0X_MIN_DISTANCE);
|
||||
_px4_rangefinder.set_max_distance(HXSRX0X_MAX_DISTANCE);
|
||||
_px4_rangefinder.set_fov(0.261799); // 15 degree FOV
|
||||
|
||||
Reference in New Issue
Block a user