AP_Motors, AP_RangeFinder, Filter: fixes to example sketches

This commit is contained in:
rmackay9 2012-11-08 00:29:43 +09:00
parent 56f88821e9
commit 50a4838879
5 changed files with 6 additions and 2 deletions

View File

@ -42,7 +42,7 @@ Arduino_Mega_ISR_Registry isr_registry;
//APM_RC_APM1 APM_RC;
APM_RC_APM2 APM_RC;
RC_Channel rc1, rc2, rc3, rc4;
RC_Channel rc1(CH_1), rc2(CH_2), rc3(CH_3), rc4(CH_4);
// uncomment the row below depending upon what frame you are using
//AP_MotorsTri motors(AP_MOTORS_APM1, &APM_RC, &rc1, &rc2, &rc3, &rc4);

View File

@ -13,6 +13,7 @@
#include <AP_ADC.h> // ArduPilot Mega Analog to Digital Converter Library
#include <AP_AnalogSource.h>
#include <ModeFilter.h> // mode filter
#include <AP_Buffer.h>
////////////////////////////////////////////////////////////////////////////////
// Serial ports
@ -57,7 +58,6 @@ void setup()
timer_scheduler.init(&isr_registry);
#ifdef USE_ADC_ADS7844
adc.filter_result = true;
adc.Init(&timer_scheduler); // APM ADC initialization
aRF.calculate_scaler(SONAR_TYPE,3.3); // setup scaling for sonar
#else

View File

@ -7,6 +7,7 @@
#include <AP_Math.h>
#include <Filter.h>
#include <DerivativeFilter.h>
#include <AP_Buffer.h>
#ifdef DESKTOP_BUILD
// all of this is needed to build with SITL
@ -24,6 +25,7 @@
#include <I2C.h>
#include <SPI.h>
#include <AP_Declination.h>
#include <AP_Semaphore.h>
Arduino_Mega_ISR_Registry isr_registry;
AP_Baro_BMP085_HIL barometer;
AP_Compass_HIL compass;

View File

@ -9,6 +9,7 @@
#include <Filter.h> // Filter library
#include <ModeFilter.h> // ModeFilter class (inherits from Filter class)
#include <AverageFilter.h> // AverageFilter class (inherits from Filter class)
#include <AP_Buffer.h>
////////////////////////////////////////////////////////////////////////////////
// Serial ports

View File

@ -8,6 +8,7 @@
#include <AP_Math.h> // ArduPilot Mega Vector/Matrix math Library
#include <Filter.h> // Filter library
#include <LowPassFilter.h> // LowPassFilter class (inherits from Filter class)
#include <AP_Buffer.h>
////////////////////////////////////////////////////////////////////////////////
// Serial ports