mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-11-29 03:30:48 +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.
(cherry picked from commit 97a3c7f017)
This commit is contained in:
1 parent
71dd16ed2d
commit
5798e0fd98
1 file changed
+1
-1
@@ -68,7 +68,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