mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-05-16 11:57:34 +08:00
Fix srf05 driver.
This commit is contained in:
@@ -152,7 +152,7 @@ SRF05::measure()
|
||||
const hrt_abstime timestamp_sample = hrt_absolute_time();
|
||||
const hrt_abstime dt = _falling_edge_time - _rising_edge_time;
|
||||
|
||||
const float current_distance = dt * 343.0f / 10e6f / 2.0f;
|
||||
const float current_distance = dt * 343.0f / 1e6f / 2.0f;
|
||||
|
||||
if (dt > HXSRX0X_CONVERSION_TIMEOUT) {
|
||||
perf_count(_comms_errors);
|
||||
|
||||
Reference in New Issue
Block a user