mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-09 09:28:31 -04:00
Copter: change to Compass::learn_offsets
This commit is contained in:
parent
99f2c8387c
commit
9c66dd0d2c
@ -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) {
|
||||
|
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user