Airspeed: Move to 0-based index

This commit is contained in:
Lorenz Meier
2015-02-09 22:56:21 +01:00
parent 3036ad034d
commit 6e4b95e844
3 changed files with 10 additions and 10 deletions
+4 -4
View File
@@ -300,7 +300,7 @@ start(int i2c_bus)
goto fail;
/* set the poll rate to default, starts automatic data collection */
fd = open(AIRSPEED_DEVICE_PATH, O_RDONLY);
fd = open(AIRSPEED0_DEVICE_PATH, O_RDONLY);
if (fd < 0)
goto fail;
@@ -349,10 +349,10 @@ test()
ssize_t sz;
int ret;
int fd = open(AIRSPEED_DEVICE_PATH, O_RDONLY);
int fd = open(ETS_PATH, O_RDONLY);
if (fd < 0)
err(1, "%s open failed (try 'ets_airspeed start' if the driver is not running", AIRSPEED_DEVICE_PATH);
err(1, "%s open failed (try 'ets_airspeed start' if the driver is not running", ETS_PATH);
/* do a simple demand read */
sz = read(fd, &report, sizeof(report));
@@ -402,7 +402,7 @@ test()
void
reset()
{
int fd = open(AIRSPEED_DEVICE_PATH, O_RDONLY);
int fd = open(ETS_PATH, O_RDONLY);
if (fd < 0)
err(1, "failed ");