Added fields to range finder clarifying sensor properties

This commit is contained in:
Lorenz Meier
2014-04-13 23:29:12 +02:00
parent 14dae529f0
commit 80cd2e6c9b
+9 -2
View File
@@ -46,6 +46,10 @@
#define RANGE_FINDER_DEVICE_PATH "/dev/range_finder" #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 * range finder report structure. Reads from the device must be in multiples of this
* structure. * structure.
@@ -53,8 +57,11 @@
struct range_finder_report { struct range_finder_report {
uint64_t timestamp; uint64_t timestamp;
uint64_t error_count; uint64_t error_count;
float distance; /** in meters */ unsigned type; /**< type, following RANGE_FINDER_TYPE enum */
uint8_t valid; /** 1 == within sensor range, 0 = outside sensor range */ 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 */
}; };
/* /*