mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-21 16:18:29 -04:00
AP_Periph: use rangefinder get_address()
This commit is contained in:
parent
603e5c4b55
commit
d789c618a2
@ -1595,6 +1595,7 @@ void AP_Periph_FW::can_rangefinder_update(void)
|
||||
}
|
||||
uint16_t dist_cm = rangefinder.distance_cm_orient(ROTATION_NONE);
|
||||
uavcan_equipment_range_sensor_Measurement pkt {};
|
||||
pkt.sensor_id = rangefinder.get_address(0);
|
||||
switch (status) {
|
||||
case RangeFinder::Status::OutOfRangeLow:
|
||||
pkt.reading_type = UAVCAN_EQUIPMENT_RANGE_SENSOR_MEASUREMENT_READING_TYPE_TOO_CLOSE;
|
||||
|
Loading…
Reference in New Issue
Block a user