mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-02-21 23:33:57 -04:00
Plane: change to Compass::learn_offsets
This commit is contained in:
parent
f493b1c07a
commit
99f2c8387c
@ -859,7 +859,7 @@ static void update_compass(void)
|
||||
{
|
||||
if (g.compass_enabled && compass.read()) {
|
||||
ahrs.set_compass(&compass);
|
||||
compass.null_offsets();
|
||||
compass.learn_offsets();
|
||||
if (should_log(MASK_LOG_COMPASS)) {
|
||||
Log_Write_Compass();
|
||||
}
|
||||
|
@ -516,7 +516,7 @@ test_mag(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();
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user