diff --git a/ArduCopterMega/ArduCopterMega.pde b/ArduCopterMega/ArduCopterMega.pde index d177b26def..f717086450 100644 --- a/ArduCopterMega/ArduCopterMega.pde +++ b/ArduCopterMega/ArduCopterMega.pde @@ -126,14 +126,8 @@ static AP_Int8 *flight_modes = &g.flight_mode1; // real sensors AP_ADC_ADS7844 adc; APM_BMP085_Class barometer; - // MAG PROTOCOL - #if MAG_PROTOCOL == MAG_PROTOCOL_5843 AP_Compass_HMC5843 compass(Parameters::k_param_compass); - #elif MAG_PROTOCOL == MAG_PROTOCOL_5883L - AP_Compass_HMC5883L compass(Parameters::k_param_compass); - #else - #error Unrecognised MAG_PROTOCOL setting. - #endif + #ifdef OPTFLOW_ENABLED AP_OpticalFlow_ADNS3080 optflow; #endif diff --git a/ArduCopterMega/config.h b/ArduCopterMega/config.h index a95bac3399..dd4b67d186 100644 --- a/ArduCopterMega/config.h +++ b/ArduCopterMega/config.h @@ -202,9 +202,6 @@ #ifndef MAG_ORIENTATION # define MAG_ORIENTATION AP_COMPASS_COMPONENTS_DOWN_PINS_FORWARD #endif -#ifndef MAG_PROTOCOL -# define MAG_PROTOCOL MAG_PROTOCOL_5843 // Default Setting -#endif ////////////////////////////////////////////////////////////////////////////// diff --git a/ArduCopterMega/defines.h b/ArduCopterMega/defines.h index 66357f7653..ca0e2cc068 100644 --- a/ArduCopterMega/defines.h +++ b/ArduCopterMega/defines.h @@ -9,11 +9,6 @@ #define SONAR 0 #define BARO 1 -//MAGNETOMETER -// ---------------------- -#define MAG_PROTOCOL_5843 0 -#define MAG_PROTOCOL_5883L 1 - // CH 7 control #define DO_SET_HOVER 0 #define DO_FLIP 1