mirror of https://github.com/ArduPilot/ardupilot
AP_Compass - added support for HMC5883L
git-svn-id: https://arducopter.googlecode.com/svn/trunk@2461 f9c3cf11-9bcb-44bc-f272-b75c42450872
This commit is contained in:
parent
9b1be05369
commit
b640e7b68c
|
@ -27,7 +27,7 @@ void setup()
|
||||||
Wire.begin();
|
Wire.begin();
|
||||||
compass.init(); // Initialization
|
compass.init(); // Initialization
|
||||||
|
|
||||||
compass.set_orientation(AP_COMPASS_COMPONENTS_UP_PINS_FORWARD); // set compass's orientation on aircraft
|
compass.set_orientation(AP_COMPASS_COMPONENTS_UP_PINS_FORWARD); // set compass's orientation on aircraft. If using HMC5883L, AP_COMPASS_HMC5883L_COMPONENTS_UP_PINS_FORWARD
|
||||||
compass.set_offsets(0,0,0); // set offsets to account for surrounding interference
|
compass.set_offsets(0,0,0); // set offsets to account for surrounding interference
|
||||||
compass.set_declination(ToRad(0.0)); // set local difference between magnetic north and true north
|
compass.set_declination(ToRad(0.0)); // set local difference between magnetic north and true north
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue