Browse Source

Sonar - changed default pin to A0

master
Randy Mackay 13 years ago
parent
commit
8dee001657
  1. 2
      ArduCopter/config.h
  2. 2
      libraries/AP_RangeFinder/examples/AP_RangeFinder_test/AP_RangeFinder_test.pde

2
ArduCopter/config.h

@ -176,7 +176,7 @@
# endif # endif
#elif CONFIG_SONAR_SOURCE == SONAR_SOURCE_ANALOG_PIN #elif CONFIG_SONAR_SOURCE == SONAR_SOURCE_ANALOG_PIN
# ifndef CONFIG_SONAR_SOURCE_ANALOG_PIN # ifndef CONFIG_SONAR_SOURCE_ANALOG_PIN
# define CONFIG_SONAR_SOURCE_ANALOG_PIN A1 # define CONFIG_SONAR_SOURCE_ANALOG_PIN A0
# endif # endif
#else #else
# warning Invalid value for CONFIG_SONAR_SOURCE, disabling sonar # warning Invalid value for CONFIG_SONAR_SOURCE, disabling sonar

2
libraries/AP_RangeFinder/examples/AP_RangeFinder_test/AP_RangeFinder_test.pde

@ -30,7 +30,7 @@ ModeFilter mode_filter;
AP_ADC_ADS7844 adc; AP_ADC_ADS7844 adc;
AP_AnalogSource_ADC adc_source(&adc, AP_RANGEFINDER_PITOT_TYPE_ADC_CHANNEL, 0.25); // use Pitot tube AP_AnalogSource_ADC adc_source(&adc, AP_RANGEFINDER_PITOT_TYPE_ADC_CHANNEL, 0.25); // use Pitot tube
#else #else
AP_AnalogSource_Arduino adc_source(A1); // use AN1 analog pin (APM1: on oilpan at back right near the CLI switch. APM2: on left) AP_AnalogSource_Arduino adc_source(A0); // use AN0 analog pin for APM2 on left
#endif #endif
// create the range finder object // create the range finder object

Loading…
Cancel
Save