Skip to content
Snippets Groups Projects
Commit 92d90f77 authored by Mark Charlebois's avatar Mark Charlebois
Browse files

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: default avatarMark Charlebois <charlebm@gmail.com>
parent f62ea8ae
No related branches found
No related tags found
No related merge requests found
......@@ -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)");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment