diff options
author | Lorenz Meier <lm@inf.ethz.ch> | 2014-02-15 21:00:48 +0100 |
---|---|---|
committer | Lorenz Meier <lm@inf.ethz.ch> | 2014-02-15 21:00:48 +0100 |
commit | 28536682aa664b5dae74b96688cc66b919fccffe (patch) | |
tree | 76c5a3ebd73e8676ba3f84b2f6c5070c5cf7edf8 /src/drivers/ets_airspeed/ets_airspeed.cpp | |
parent | 51b7c27363e36d1a953a980574e4f4753e1aa86c (diff) | |
download | px4-firmware-28536682aa664b5dae74b96688cc66b919fccffe.tar.gz px4-firmware-28536682aa664b5dae74b96688cc66b919fccffe.tar.bz2 px4-firmware-28536682aa664b5dae74b96688cc66b919fccffe.zip |
Fix airspeed sensor
Diffstat (limited to 'src/drivers/ets_airspeed/ets_airspeed.cpp')
-rw-r--r-- | src/drivers/ets_airspeed/ets_airspeed.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/drivers/ets_airspeed/ets_airspeed.cpp b/src/drivers/ets_airspeed/ets_airspeed.cpp index 8bbef5cfa..b6e80ce1d 100644 --- a/src/drivers/ets_airspeed/ets_airspeed.cpp +++ b/src/drivers/ets_airspeed/ets_airspeed.cpp @@ -77,6 +77,7 @@ /* I2C bus address */ #define I2C_ADDRESS 0x75 /* 7-bit address. 8-bit address is 0xEA */ +#define ETS_PATH "/dev/ets_airspeed" /* Register address */ #define READ_CMD 0x07 /* Read the data */ @@ -93,7 +94,7 @@ class ETSAirspeed : public Airspeed { public: - ETSAirspeed(int bus, int address = I2C_ADDRESS); + ETSAirspeed(int bus, int address = I2C_ADDRESS, const char* path = ETS_PATH); protected: @@ -112,8 +113,8 @@ protected: */ extern "C" __EXPORT int ets_airspeed_main(int argc, char *argv[]); -ETSAirspeed::ETSAirspeed(int bus, int address) : Airspeed(bus, address, - CONVERSION_INTERVAL) +ETSAirspeed::ETSAirspeed(int bus, int address, const char* path) : Airspeed(bus, address, + CONVERSION_INTERVAL, path) { } |