mirror of
https://gitee.com/xiaohuolufeihua/bizhang_-obav.git
synced 2026-05-22 01:12:31 +00:00
Change #defines to static constexpr types in LidateLite.h, updated the docs link in ll40ls.cpp, and shortened comments to allow uniform indentation in LidarLiteI2C.h.
This commit is contained in:
@@ -46,17 +46,16 @@
|
||||
|
||||
using namespace time_literals;
|
||||
|
||||
/* Device limits */
|
||||
#define LL40LS_MIN_DISTANCE (0.05f)
|
||||
#define LL40LS_MAX_DISTANCE (25.00f)
|
||||
#define LL40LS_MAX_DISTANCE_V2 (35.00f)
|
||||
|
||||
// Device limits
|
||||
static constexpr float LL40LS_MIN_DISTANCE{0.05f};
|
||||
static constexpr float LL40LS_MAX_DISTANCE{25.00f};
|
||||
static constexpr float LL40LS_MAX_DISTANCE_V2{35.00f};
|
||||
|
||||
// Normal conversion wait time.
|
||||
#define LL40LS_CONVERSION_INTERVAL 50_ms
|
||||
static constexpr uint32_t LL40LS_CONVERSION_INTERVAL{50_ms};
|
||||
|
||||
// Maximum time to wait for a conversion to complete.
|
||||
#define LL40LS_CONVERSION_TIMEOUT 100_ms
|
||||
static constexpr uint32_t LL40LS_CONVERSION_TIMEOUT{100_ms};
|
||||
|
||||
class LidarLite
|
||||
{
|
||||
|
||||
@@ -73,9 +73,9 @@ static constexpr uint8_t LL40LS_SIG_COUNT_VAL_MAX = 0xFF; /* Maximum acquisi
|
||||
static constexpr int LL40LS_SIGNAL_STRENGTH_MIN_V3HP = 70; /* Min signal strength for V3HP */
|
||||
static constexpr int LL40LS_SIGNAL_STRENGTH_MAX_V3HP = 255; /* Max signal strength for V3HP */
|
||||
|
||||
static constexpr int LL40LS_SIGNAL_STRENGTH_LOW = 24; /* Minimum relative signal strength for a valid measurement */
|
||||
static constexpr int LL40LS_PEAK_STRENGTH_LOW = 135; /* Minimum peak strength raw value for accepting a measurement */
|
||||
static constexpr int LL40LS_PEAK_STRENGTH_HIGH = 234; /* Max peak strength raw value */
|
||||
static constexpr int LL40LS_SIGNAL_STRENGTH_LOW = 24; /* Minimum signal strength for a valid measurement */
|
||||
static constexpr int LL40LS_PEAK_STRENGTH_LOW = 135; /* Minimum peak strength for accepting a measurement */
|
||||
static constexpr int LL40LS_PEAK_STRENGTH_HIGH = 234; /* Max peak strength raw value */
|
||||
|
||||
|
||||
class LidarLiteI2C : public LidarLite, public device::I2C, public px4::ScheduledWorkItem
|
||||
|
||||
@@ -231,7 +231,7 @@ I2C bus driver for LidarLite rangefinders.
|
||||
|
||||
The sensor/driver must be enabled using the parameter SENS_EN_LL40LS.
|
||||
|
||||
Setup/usage information: https://docs.px4.io/v1.9.0/en/sensor/lidar_lite.htmls
|
||||
Setup/usage information: https://docs.px4.io/en/sensor/lidar_lite.html
|
||||
|
||||
### Examples
|
||||
|
||||
|
||||
Reference in New Issue
Block a user