Fix srf05 driver.

This commit is contained in:
Tia
2021-09-18 11:35:23 +08:00
committed by Daniel Agar
parent b35dd86d04
commit 6e3e6846f4
+1 -1
View File
@@ -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);