mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-04-14 10:07:39 +08:00
LidarLitePWM: refactor static cast and comment
This commit is contained in:
parent
5010b01e2e
commit
d5c9ea048e
@ -109,7 +109,7 @@ LidarLitePWM::measure()
|
||||
return PX4_ERROR;
|
||||
}
|
||||
|
||||
const float current_distance = float(_pwm.pulse_width) * 1e-3f; /* 10 usec = 1 cm distance for LIDAR-Lite */
|
||||
const float current_distance = static_cast<float>(_pwm.pulse_width) * 1e-3f; // 1us = 1mm distance for LIDAR-Lite
|
||||
|
||||
/* Due to a bug in older versions of the LidarLite firmware, we have to reset sensor on (distance == 0) */
|
||||
if (current_distance <= 0.0f) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user