diff options
author | Lorenz Meier <lm@inf.ethz.ch> | 2014-12-30 10:28:35 +0100 |
---|---|---|
committer | Lorenz Meier <lm@inf.ethz.ch> | 2014-12-30 10:28:35 +0100 |
commit | 7bed5b382f8c89a061970f94b61d610899475160 (patch) | |
tree | 3b1be124086c6d7382f4093818e2683350010416 /src/drivers/px4flow | |
parent | c4e357747690e77c4867bfc35083cab174a8d026 (diff) | |
download | px4-firmware-7bed5b382f8c89a061970f94b61d610899475160.tar.gz px4-firmware-7bed5b382f8c89a061970f94b61d610899475160.tar.bz2 px4-firmware-7bed5b382f8c89a061970f94b61d610899475160.zip |
Clean up docs in PX4FLOW driver
Diffstat (limited to 'src/drivers/px4flow')
-rw-r--r-- | src/drivers/px4flow/px4flow.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/drivers/px4flow/px4flow.cpp b/src/drivers/px4flow/px4flow.cpp index 62308fc65..7e3461ba1 100644 --- a/src/drivers/px4flow/px4flow.cpp +++ b/src/drivers/px4flow/px4flow.cpp @@ -73,13 +73,14 @@ #include <board_config.h> /* Configuration Constants */ -#define I2C_FLOW_ADDRESS 0x42 //* 7-bit address. 8-bit address is 0x84 -//range 0x42 - 0x49 +#define I2C_FLOW_ADDRESS 0x42 ///< 7-bit address. 8-bit address is 0x84, range 0x42 - 0x49 /* PX4FLOW Registers addresses */ -#define PX4FLOW_REG 0x16 /* Measure Register 22*/ +#define PX4FLOW_REG 0x16 ///< Measure Register 22 + +#define PX4FLOW_CONVERSION_INTERVAL 20000 ///< in microseconds! 20000 = 50 Hz 100000 = 10Hz +#define PX4FLOW_I2C_MAX_BUS_SPEED 400000 ///< 400 KHz maximum speed -#define PX4FLOW_CONVERSION_INTERVAL 20000 //in microseconds! 20000 = 50 Hz 100000 = 10Hz /* oddly, ERROR is not defined for c++ */ #ifdef ERROR # undef ERROR @@ -200,7 +201,7 @@ private: extern "C" __EXPORT int px4flow_main(int argc, char *argv[]); PX4FLOW::PX4FLOW(int bus, int address) : - I2C("PX4FLOW", PX4FLOW_DEVICE_PATH, bus, address, 400000), //400khz + I2C("PX4FLOW", PX4FLOW_DEVICE_PATH, bus, address, PX4FLOW_I2C_MAX_BUS_SPEED), /* 100-400 KHz */ _reports(nullptr), _sensor_ok(false), _measure_ticks(0), |