mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-11-23 15:31:13 +08:00
fix(afbrs50): keep the AFBR-S50 device type in the device ID (#29104)
set_device_type writes the device ID's devtype, so passing the MAVLink sensor type there replaced DRV_DIST_DEVTYPE_AFBRS50 with 0 and every AFBR-S50 reported an unknown device. The MAVLink type belongs in set_rangefinder_type.
This commit is contained in:
1 parent
edeba2f8f6
commit
97a3c7f017
1 file changed
+1
-1
@@ -95,7 +95,7 @@ AFBRS50::AFBRS50():
|
||||
device_id.devid_s.devtype = DRV_DIST_DEVTYPE_AFBRS50;
|
||||
|
||||
_px4_rangefinder.set_device_id(device_id.devid);
|
||||
_px4_rangefinder.set_device_type(distance_sensor_s::MAV_DISTANCE_SENSOR_LASER);
|
||||
_px4_rangefinder.set_rangefinder_type(distance_sensor_s::MAV_DISTANCE_SENSOR_LASER);
|
||||
}
|
||||
|
||||
AFBRS50::~AFBRS50()
|
||||
|
||||
Reference in new issue
Block a user