Updated to latest DriverFramework

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
This commit is contained in:
Mark Charlebois 2015-11-13 12:54:54 -08:00
parent 1fa20819d8
commit 40b488d693
2 changed files with 6 additions and 5 deletions

View File

@ -1110,13 +1110,13 @@ start(enum Rotation rotation)
DevMgr::getHandle(ACCELSIM_DEVICE_PATH_MAG, h_mag);
/* don't fail if mag dev cannot be opened */
if (!h_mag.isValid()) {
if (h.ioctl(SENSORIOCSPOLLRATE, (void *)SENSOR_POLLRATE_DEFAULT) < 0) {
PX4_ERR("ioctl SENSORIOCSPOLLRATE %s failed", ACCELSIM_DEVICE_PATH_ACCEL);
if (h_mag.isValid()) {
if (h_mag.ioctl(SENSORIOCSPOLLRATE, (void *)SENSOR_POLLRATE_DEFAULT) < 0) {
PX4_ERR("ioctl SENSORIOCSPOLLRATE %s failed", ACCELSIM_DEVICE_PATH_MAG);
}
} else {
PX4_ERR("ioctl SENSORIOCSPOLLRATE %s failed", ACCELSIM_DEVICE_PATH_ACCEL);
PX4_ERR("ioctl SENSORIOCSPOLLRATE %s failed", ACCELSIM_DEVICE_PATH_MAG);
}
DevMgr::releaseHandle(h);

View File

@ -1169,7 +1169,8 @@ GYROSIM_gyro::GYROSIM_gyro(GYROSIM *parent, const char *path) :
int
GYROSIM_gyro::init()
{
return start();
int ret = VirtDevObj::init();
return ret ? ret : start();
}
void