Copter: change to Compass::learn_offsets

This commit is contained in:
Andrew Tridgell 2014-02-16 13:22:13 +11:00
parent 99f2c8387c
commit 9c66dd0d2c
2 changed files with 2 additions and 2 deletions

View File

@ -1066,7 +1066,7 @@ static void update_batt_compass(void)
// update compass with throttle value - used for compassmot
compass.set_throttle((float)g.rc_3.servo_out/1000.0f);
if (compass.read()) {
compass.null_offsets();
compass.learn_offsets();
}
// log compass information
if (g.log_bitmask & MASK_LOG_COMPASS) {

View File

@ -136,7 +136,7 @@ test_compass(uint8_t argc, const Menu::arg *argv)
// Calculate heading
const Matrix3f &m = ahrs.get_dcm_matrix();
heading = compass.calculate_heading(m);
compass.null_offsets();
compass.learn_offsets();
}
medium_loopCounter = 0;
}