diff --git a/Arducopter/Arducopter.pde b/Arducopter/Arducopter.pde index 0bba456bae..77693f676b 100644 --- a/Arducopter/Arducopter.pde +++ b/Arducopter/Arducopter.pde @@ -105,6 +105,7 @@ #include #include #include +#include #ifdef UseBMP #include #endif @@ -370,8 +371,10 @@ void setup() if(pitch_mid < 1400 || pitch_mid > 1600) pitch_mid = 1500; if(yaw_mid < 1400 || yaw_mid > 1600) yaw_mid = 1500; - if (MAGNETOMETER == 1) + if (MAGNETOMETER == 1) { APM_Compass.Init(); // I2C initialization + APM_Compass.SetOrientation(APM_COMPASS_COMPONENTS_UP_PINS_BACK); + } DataFlash.StartWrite(1); // Start a write session on page 1