diff options
author | Lorenz Meier <lm@inf.ethz.ch> | 2014-04-13 23:29:12 +0200 |
---|---|---|
committer | Lorenz Meier <lm@inf.ethz.ch> | 2014-04-13 23:29:12 +0200 |
commit | 80cd2e6c9b03eb078aafe2814ff1c9d2753ac073 (patch) | |
tree | 0dc87992c0f7df6be88ca3e9f8e5d603dd64eb81 /src/drivers | |
parent | 14dae529f0b2a41ce7441871f30a9da462be8e72 (diff) | |
download | px4-firmware-80cd2e6c9b03eb078aafe2814ff1c9d2753ac073.tar.gz px4-firmware-80cd2e6c9b03eb078aafe2814ff1c9d2753ac073.tar.bz2 px4-firmware-80cd2e6c9b03eb078aafe2814ff1c9d2753ac073.zip |
Added fields to range finder clarifying sensor properties
Diffstat (limited to 'src/drivers')
-rw-r--r-- | src/drivers/drv_range_finder.h | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/drivers/drv_range_finder.h b/src/drivers/drv_range_finder.h index cf91f7030..e45939b37 100644 --- a/src/drivers/drv_range_finder.h +++ b/src/drivers/drv_range_finder.h @@ -46,6 +46,10 @@ #define RANGE_FINDER_DEVICE_PATH "/dev/range_finder" +enum RANGE_FINDER_TYPE { + RANGE_FINDER_TYPE_LASER = 0, +}; + /** * range finder report structure. Reads from the device must be in multiples of this * structure. @@ -53,8 +57,11 @@ struct range_finder_report { uint64_t timestamp; uint64_t error_count; - float distance; /** in meters */ - uint8_t valid; /** 1 == within sensor range, 0 = outside sensor range */ + unsigned type; /**< type, following RANGE_FINDER_TYPE enum */ + float distance; /**< in meters */ + float minimum_distance; /**< minimum distance the sensor can measure */ + float maximum_distance; /**< maximum distance the sensor can measure */ + uint8_t valid; /**< 1 == within sensor range, 0 = outside sensor range */ }; /* |