forked from Archive/PX4-Autopilot
Updated to latest DriverFramework
Signed-off-by: Mark Charlebois <charlebm@gmail.com>
This commit is contained in:
parent
1fa20819d8
commit
40b488d693
|
@ -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);
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue