mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-05-23 22:58:10 +08:00
Robustify Ulanding Radar (#24333)
* [ulanding_radar] Fix comms error perf counter usage * [ulanding_radar] Workaround for lost messages by lowering sampling rate The current implementation of the Aerotenna uLanding radar driver assumes that the UART frames are received in full. If the driver polls with 10ms this is not always the case and the driver will fail to parse the frame leading to significant packet loss. This workaround polls at 12ms which ensures that at least one entire frame is received.
This commit is contained in:
@@ -125,10 +125,15 @@ int AerotennaULanding::collect()
|
||||
|
||||
index--;
|
||||
}
|
||||
|
||||
} else {
|
||||
return -EAGAIN;
|
||||
}
|
||||
|
||||
if (!checksum_passed) {
|
||||
return -EAGAIN;
|
||||
perf_count(_comms_errors);
|
||||
perf_end(_sample_perf);
|
||||
return -EBADMSG;
|
||||
}
|
||||
|
||||
_px4_rangefinder.update(timestamp_sample, distance_m);
|
||||
|
||||
@@ -56,7 +56,7 @@
|
||||
|
||||
using namespace time_literals;
|
||||
|
||||
#define ULANDING_MEASURE_INTERVAL 10_ms
|
||||
#define ULANDING_MEASURE_INTERVAL 12_ms
|
||||
#define ULANDING_MAX_DISTANCE 50.0f
|
||||
#define ULANDING_MIN_DISTANCE 0.315f
|
||||
#define ULANDING_VERSION 1
|
||||
|
||||
Reference in New Issue
Block a user