mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-11 18:38:28 -04:00
AP_Compass: report compass initialisation failure
don't just put out rubbish values git-svn-id: https://arducopter.googlecode.com/svn/trunk@2717 f9c3cf11-9bcb-44bc-f272-b75c42450872
This commit is contained in:
parent
fd2547216d
commit
e9bb030fd4
@ -25,7 +25,10 @@ void setup()
|
|||||||
Serial.begin(115200);
|
Serial.begin(115200);
|
||||||
Serial.println("Compass library test (HMC5843 and HMC5883L)");
|
Serial.println("Compass library test (HMC5843 and HMC5883L)");
|
||||||
Wire.begin();
|
Wire.begin();
|
||||||
compass.init(); // Initialization
|
if (!compass.init()) {
|
||||||
|
Serial.println("compass initialisation failed!");
|
||||||
|
while (1) ;
|
||||||
|
}
|
||||||
|
|
||||||
compass.set_orientation(AP_COMPASS_COMPONENTS_DOWN_PINS_FORWARD); // set compass's orientation on aircraft.
|
compass.set_orientation(AP_COMPASS_COMPONENTS_DOWN_PINS_FORWARD); // set compass's orientation on aircraft.
|
||||||
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
|
||||||
|
Loading…
Reference in New Issue
Block a user