diff options
author | px4dev <px4@purgatory.org> | 2012-08-25 11:52:44 -0700 |
---|---|---|
committer | px4dev <px4@purgatory.org> | 2012-08-25 11:52:44 -0700 |
commit | 23d8b69e3ddd3df55d1383f77751882c915466d0 (patch) | |
tree | dc01f8570aefeef29ef5d407d98803c05899846e /apps/drivers/mpu6000/mpu6000.cpp | |
parent | 0dc0a0539dafdf1727763cc145f02faa8a8e7d22 (diff) | |
download | px4-firmware-23d8b69e3ddd3df55d1383f77751882c915466d0.tar.gz px4-firmware-23d8b69e3ddd3df55d1383f77751882c915466d0.tar.bz2 px4-firmware-23d8b69e3ddd3df55d1383f77751882c915466d0.zip |
Sensor drivers should run all the time, not just when their device is open.
Disable this for the mpu6000 driver though, as it's currently busted in that regard.
Diffstat (limited to 'apps/drivers/mpu6000/mpu6000.cpp')
-rw-r--r-- | apps/drivers/mpu6000/mpu6000.cpp | 27 |
1 files changed, 4 insertions, 23 deletions
diff --git a/apps/drivers/mpu6000/mpu6000.cpp b/apps/drivers/mpu6000/mpu6000.cpp index 0a1876426..57713f40b 100644 --- a/apps/drivers/mpu6000/mpu6000.cpp +++ b/apps/drivers/mpu6000/mpu6000.cpp @@ -157,9 +157,6 @@ public: virtual ssize_t read(struct file *filp, char *buffer, size_t buflen); virtual int ioctl(struct file *filp, int cmd, unsigned long arg); - virtual int open_first(struct file *filp); - virtual int close_last(struct file *filp); - /** * Diagnostics - print some basic information about the driver. */ @@ -322,6 +319,7 @@ MPU6000::MPU6000(int bus, spi_dev_e device) : memset(&_accel_report, 0, sizeof(_accel_report)); memset(&_gyro_report, 0, sizeof(_gyro_report)); + memset(&_call, 0, sizeof(_call)); } MPU6000::~MPU6000() @@ -445,26 +443,6 @@ MPU6000::init() } int -MPU6000::open_first(struct file *filp) -{ - /* reset to manual-poll mode */ - _call_interval = 0; - - /* XXX set default sampling/acquisition parameters */ - - return OK; -} - -int -MPU6000::close_last(struct file *filp) -{ - /* stop measurement */ - stop(); - - return OK; -} - -int MPU6000::probe() { @@ -911,12 +889,15 @@ start() if (OK != g_dev->init()) goto fail; +#if 0 /* XXX don't do this for now - the auto-poller is børked */ + /* set the poll rate to default, starts automatic data collection */ fd = open(ACCEL_DEVICE_PATH, O_RDONLY); if (fd < 0) goto fail; if (ioctl(fd, SENSORIOCSPOLLRATE, SENSOR_POLLRATE_DEFAULT) < 0) goto fail; +#endif exit(0); fail: |