|
|
@ -1,7 +1,7 @@ |
|
|
|
/* |
|
|
|
/* |
|
|
|
AP_RangeFinder_test |
|
|
|
* AP_RangeFinder_test |
|
|
|
Code by DIYDrones.com |
|
|
|
* Code by DIYDrones.com |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
|
|
|
|
|
|
|
|
// includes |
|
|
|
// includes |
|
|
|
#include <FastSerial.h> |
|
|
|
#include <FastSerial.h> |
|
|
@ -36,10 +36,10 @@ ModeFilterInt16_Size5 mode_filter(2); |
|
|
|
AP_TimerProcess timer_scheduler; |
|
|
|
AP_TimerProcess timer_scheduler; |
|
|
|
|
|
|
|
|
|
|
|
#ifdef USE_ADC_ADS7844 |
|
|
|
#ifdef USE_ADC_ADS7844 |
|
|
|
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(A0); // use AN0 analog pin for 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 |
|
|
|