diff options
author | Mark Charlebois <charlebm@gmail.com> | 2015-04-01 18:13:59 -0700 |
---|---|---|
committer | Mark Charlebois <charlebm@gmail.com> | 2015-04-20 11:34:12 -0700 |
commit | 92d90f7780d69ed7106da53cf43ec4056760af89 (patch) | |
tree | c543d18360a7f8606dead0c543cb9b02d47a3d56 /src | |
parent | f62ea8aeae74bc4732f36e2a052f6ca1317b8238 (diff) | |
download | px4-firmware-92d90f7780d69ed7106da53cf43ec4056760af89.tar.gz px4-firmware-92d90f7780d69ed7106da53cf43ec4056760af89.tar.bz2 px4-firmware-92d90f7780d69ed7106da53cf43ec4056760af89.zip |
Linux: ms5611 open, close changed to px4_open, px4_close
Calls to open and close were used instead of px4_open and px4_close.
Signed-off-by: Mark Charlebois <charlebm@gmail.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/drivers/ms5611/ms5611_linux.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/drivers/ms5611/ms5611_linux.cpp b/src/drivers/ms5611/ms5611_linux.cpp index 490601b74..4acb2f251 100644 --- a/src/drivers/ms5611/ms5611_linux.cpp +++ b/src/drivers/ms5611/ms5611_linux.cpp @@ -894,7 +894,7 @@ start_bus(struct ms5611_bus_option &bus) return false; } - int fd = open(bus.devpath, O_RDONLY); + int fd = px4_open(bus.devpath, O_RDONLY); /* set the poll rate to default, starts automatic data collection */ if (fd == -1) { @@ -902,12 +902,12 @@ start_bus(struct ms5611_bus_option &bus) return false; } if (px4_ioctl(fd, SENSORIOCSPOLLRATE, SENSOR_POLLRATE_DEFAULT) < 0) { - close(fd); + px4_close(fd); warnx("failed setting default poll rate"); return false; } - close(fd); + px4_close(fd); return true; } @@ -959,7 +959,6 @@ struct ms5611_bus_option &find_bus(enum MS5611_BUS busid) } // FIXME - This is fatal to all threads errx(1, "bus %u not started", (unsigned)busid); - } /** @@ -977,7 +976,7 @@ test(enum MS5611_BUS busid) int fd; - fd = open(bus.devpath, O_RDONLY); + fd = px4_open(bus.devpath, O_RDONLY); if (fd < 0) { warn("open failed (try 'ms5611 start' if the driver is not running)"); return 1; @@ -1098,7 +1097,7 @@ calibrate(unsigned altitude, enum MS5611_BUS busid) int fd; - fd = open(bus.devpath, O_RDONLY); + fd = px4_open(bus.devpath, O_RDONLY); if (fd < 0) { warn("open failed (try 'ms5611 start' if the driver is not running)"); |