mirror of https://github.com/ArduPilot/ardupilot
incorporated Jose's magnetometer offset code into APM_Compass library so added a call to set the mag's declination (just to make it easier for people to add).
git-svn-id: https://arducopter.googlecode.com/svn/trunk@637 f9c3cf11-9bcb-44bc-f272-b75c42450872
This commit is contained in:
parent
3c00a92d14
commit
5c18e5a185
|
@ -374,6 +374,7 @@ void setup()
|
||||||
if (MAGNETOMETER == 1) {
|
if (MAGNETOMETER == 1) {
|
||||||
APM_Compass.Init(); // I2C initialization
|
APM_Compass.Init(); // I2C initialization
|
||||||
APM_Compass.SetOrientation(APM_COMPASS_COMPONENTS_UP_PINS_BACK);
|
APM_Compass.SetOrientation(APM_COMPASS_COMPONENTS_UP_PINS_BACK);
|
||||||
|
APM_Compass.SetDeclination(ToRad(0.0));
|
||||||
}
|
}
|
||||||
|
|
||||||
DataFlash.StartWrite(1); // Start a write session on page 1
|
DataFlash.StartWrite(1); // Start a write session on page 1
|
||||||
|
|
Loading…
Reference in New Issue