Browse Source

AP_Compass_PX4: removed MAGIOCSSAMPLERATE call

master
Andrew Tridgell 12 years ago
parent
commit
229841052a
  1. 10
      libraries/AP_Compass/AP_Compass_PX4.cpp

10
libraries/AP_Compass/AP_Compass_PX4.cpp

@ -48,14 +48,8 @@ bool AP_Compass_PX4::init(void) @@ -48,14 +48,8 @@ bool AP_Compass_PX4::init(void)
return false;
}
/* set the mag internal poll rate to at least 150Hz */
if (0 != ioctl(_mag_fd, MAGIOCSSAMPLERATE, 150)) {
hal.console->printf("Failed to setup compass sample rate\n");
return false;
}
/* set the driver to poll at 150Hz */
if (0 != ioctl(_mag_fd, SENSORIOCSPOLLRATE, 150)) {
/* set the driver to poll at 100Hz */
if (0 != ioctl(_mag_fd, SENSORIOCSPOLLRATE, 100)) {
hal.console->printf("Failed to setup compass poll rate\n");
return false;
}

Loading…
Cancel
Save