diff --git a/ArduCopter/config.h b/ArduCopter/config.h index fbed0507b7..508290ac13 100644 --- a/ArduCopter/config.h +++ b/ArduCopter/config.h @@ -136,10 +136,6 @@ // Sonar // -#ifndef SONAR_PORT -# define SONAR_PORT AP_RANGEFINDER_PITOT_TUBE -#endif - #ifndef CONFIG_SONAR_SOURCE # define CONFIG_SONAR_SOURCE SONAR_SOURCE_ADC #endif @@ -169,18 +165,6 @@ # define SONAR_TYPE MAX_SONAR_XL #endif -// It seems that MAX_SONAR_XL depends on an ADC. For systems without an -// ADC, we need to disable the sonar -#if SONAR_TYPE == MAX_SONAR_XL -# if CONFIG_ADC == DISABLED -# if defined(CONFIG_SONAR) -# warning "MAX_SONAR_XL requires a valid ADC. This system does not have an ADC enabled." -# undef CONFIG_SONAR -# endif -# define CONFIG_SONAR DISABLED -# endif -#endif - #ifndef CONFIG_SONAR # define CONFIG_SONAR ENABLED #endif diff --git a/libraries/AP_RangeFinder/examples/AP_RangeFinder_test/AP_RangeFinder_test.pde b/libraries/AP_RangeFinder/examples/AP_RangeFinder_test/AP_RangeFinder_test.pde index 8b287b0c73..58e5dab9d5 100644 --- a/libraries/AP_RangeFinder/examples/AP_RangeFinder_test/AP_RangeFinder_test.pde +++ b/libraries/AP_RangeFinder/examples/AP_RangeFinder_test/AP_RangeFinder_test.pde @@ -19,7 +19,7 @@ ModeFilter mode_filter; // uncomment the appropriate line corresponding to where sonar is connected AP_AnalogSource_ADC adc_source(&adc, AP_RANGEFINDER_PITOT_TYPE_ADC_CHANNEL, 0.25); // uncomment this line to use Pitot tube -//AP_AnalogSource_Arduino adc_source(A5); // uncomment this line to use A5 analog pin (far back-right pin on the oilpan near the CLI switch +//AP_AnalogSource_Arduino adc_source(A4); // uncomment this line to use A5 analog pin (far back-right pin on the oilpan near the CLI switch // create the range finder object //AP_RangeFinder_SharpGP2Y aRF(&adc_source, &mode_filter);