mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-10 18:08:30 -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
d310744bfc
commit
c78da666ec
@ -25,7 +25,10 @@ void setup()
|
||||
Serial.begin(115200);
|
||||
Serial.println("Compass library test (HMC5843 and HMC5883L)");
|
||||
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_offsets(0,0,0); // set offsets to account for surrounding interference
|
||||
|
Loading…
Reference in New Issue
Block a user