mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-20 11:13:34 +08:00
Update AFBR to 1.4.4. Remove changing measurement modes. Add parameters. Default to Long range mode"
This commit is contained in:
@@ -108,14 +108,13 @@ void UavcanRangefinderBridge::range_sub_cb(const
|
||||
_inited = true;
|
||||
}
|
||||
|
||||
/*
|
||||
* FIXME HACK
|
||||
* This code used to rely on msg.getMonotonicTimestamp().toUSec() instead of HRT.
|
||||
* It stopped working when the time sync feature has been introduced, because it caused libuavcan
|
||||
* to use an independent time source (based on hardware TIM5) instead of HRT.
|
||||
* The proper solution is to be developed.
|
||||
*/
|
||||
rangefinder->update(hrt_absolute_time(), msg.range);
|
||||
int8_t quality = -1;
|
||||
|
||||
if (msg.reading_type == uavcan::equipment::range_sensor::Measurement::READING_TYPE_VALID_RANGE) {
|
||||
quality = 100;
|
||||
}
|
||||
|
||||
rangefinder->update(hrt_absolute_time(), msg.range, quality);
|
||||
}
|
||||
|
||||
int UavcanRangefinderBridge::init_driver(uavcan_bridge::Channel *channel)
|
||||
|
||||
Reference in New Issue
Block a user