diff options
author | M.H.Kabir <mhkabir98@gmail.com> | 2014-12-30 16:23:52 +0530 |
---|---|---|
committer | M.H.Kabir <mhkabir98@gmail.com> | 2014-12-30 16:23:52 +0530 |
commit | ce03794eca953a109100386af337491176481faf (patch) | |
tree | dad08b048240b20c0029803a44c858f41b340ec4 /src/drivers/px4flow | |
parent | 33653b25c6569013d0a1a5a4885457c0bdc23e06 (diff) | |
parent | 4942883ddcb5d1a09e96335b1edbbf2d937937b4 (diff) | |
download | px4-firmware-ce03794eca953a109100386af337491176481faf.tar.gz px4-firmware-ce03794eca953a109100386af337491176481faf.tar.bz2 px4-firmware-ce03794eca953a109100386af337491176481faf.zip |
Merge remote-tracking branch 'upstream/master' into flow_orient
Conflicts:
src/drivers/px4flow/px4flow.cpp
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 682cbf241..036798543 100644 --- a/src/drivers/px4flow/px4flow.cpp +++ b/src/drivers/px4flow/px4flow.cpp @@ -75,13 +75,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 @@ -204,7 +205,7 @@ private: extern "C" __EXPORT int px4flow_main(int argc, char *argv[]); PX4FLOW::PX4FLOW(int bus, int address, enum Rotation rotation) : - 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), |