Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Sep 22nd, 2012  |  syntax: C#  |  size: 11.28 KB  |  hits: 19  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. /*
  2.   AeroQuad v3.0.1 - February 2012
  3.   www.AeroQuad.com
  4.   Copyright (c) 2012 Ted Carancho.  All rights reserved.
  5.   An Open Source Arduino based multicopter.
  6.  
  7.   This program is free software: you can redistribute it and/or modify
  8.   it under the terms of the GNU General Public License as published by
  9.   the Free Software Foundation, either version 3 of the License, or
  10.   (at your option) any later version.
  11.  
  12.   This program is distributed in the hope that it will be useful,
  13.   but WITHOUT ANY WARRANTY; without even the implied warranty of
  14.   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  15.   GNU General Public License for more details.
  16.  
  17.   You should have received a copy of the GNU General Public License
  18.   along with this program. If not, see <http://www.gnu.org/licenses/>.
  19. */
  20.  
  21. /****************************************************************************
  22.  ************************* Hardware Configuration ***************************
  23.  ****************************************************************************/
  24. // Select which hardware you wish to use with the AeroQuad Flight Software
  25.  
  26. // 328p platform
  27. //#define AeroQuad_v1         // Arduino 2009 with AeroQuad Shield v1.7 and below
  28. //#define AeroQuad_v1_IDG     // Arduino 2009 with AeroQuad Shield v1.7 and below using IDG yaw gyro
  29. //#define AeroQuad_v18        // Arduino 2009 with AeroQuad Shield v1.8 or greater
  30. //#define AeroQuad_Mini       // Arduino Pro Mini with AeroQuad Mini Shield v1.0
  31. //#define AeroQuad_Wii        // Arduino 2009 with Wii Sensors and AeroQuad Shield v1.x
  32. //#define AeroQuad_Paris_v3   // Define along with either AeroQuad_Wii to include specific changes for MultiWiiCopter Paris v3.0 board
  33.  
  34. // Mega platform
  35. //#define AeroQuadMega_v1     // Arduino Mega with AeroQuad Shield v1.7 and below
  36. #define AeroQuadMega_v2     // Arduino Mega with AeroQuad Shield v2.0
  37. //#define AeroQuadMega_v21    // Arduino Mega with AeroQuad Shield v2.1
  38. //#define AutonavShield       // Really good board for the guy here http://aeroquad.com/showthread.php?4106-New-Shield-available-Mega-AutoNav-Shield&highlight=autonav
  39. //#define AeroQuadMega_Wii    // Arduino Mega with Wii Sensors and AeroQuad Shield v2.x
  40. //#define ArduCopter          // ArduPilot Mega (APM) with Oilpan Sensor Board
  41. //#define AeroQuadMega_CHR6DM // Clean Arduino Mega with CHR6DM as IMU/heading ref.
  42. //#define APM_OP_CHR6DM       // ArduPilot Mega with CHR6DM as IMU/heading ref., Oilpan for barometer (just uncomment AltitudeHold for baro), and voltage divider
  43.  
  44.  
  45. /****************************************************************************
  46.  *********************** Define Flight Configuration ************************
  47.  ****************************************************************************/
  48. // Use only one of the following definitions
  49. #define quadXConfig
  50. //#define quadPlusConfig
  51. //#define hexPlusConfig
  52. //#define hexXConfig      
  53. //#define triConfig
  54. //#define quadY4Config
  55. //#define hexY6Config
  56. //#define octoX8Config
  57. //#define octoPlusConfig  // EXPERIMENTAL: not completely re-tested
  58. //#define octoXConfig     // EXPERIMENTAL: not completely re-tested
  59.  
  60.  
  61. // MOTOR ADVANCE CONFIG SECTION
  62. //#define CHANGE_YAW_DIRECTION // if you want to reverse the yaw correction direction
  63.  
  64. #define USE_400HZ_ESC // For ESC that support 400Hz update rate, ESC OR PLATFORM MAY NOT SUPPORT IT
  65.  
  66.  
  67. //
  68. // +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  69. // In the 3.0 code the motor numbering has changed to simplify motor configuration.
  70. // Please refer to the .h files in ..\Libraries\AQ_FlightControlProcessor to see the new numbering for your flight model
  71. // Also check the http://www.aeroquad.com/showwiki.php "Build Instructions" for more detail on the 3.0 motor changes
  72. // the OLD_MOTOR_NUMBERING is compatible  with the 2.x versions of the AeroQuad code and will not need re-ordering to work
  73. // +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  74. //#define OLD_MOTOR_NUMBERING // Uncomment this for old motor numbering setup, FOR QUAD +/X MODE ONLY
  75.  
  76. //
  77. // *******************************************************************************************************************************
  78. // Optional Sensors
  79. // Warning:  If you enable HeadingHold or AltitudeHold and do not have the correct sensors connected, the flight software may hang
  80. // *******************************************************************************************************************************
  81. #define HeadingMagHold // Enables Magnetometer, gets automatically selected if CHR6DM is defined
  82. #define AltitudeHoldBaro // Enables BMP085 Barometer
  83. //#define AltitudeHoldRangeFinder // Enable altitude hold with range finder, Not displayed on the configurator
  84. //#define AutoLanding // Enable auto landing on channel AUX3 of the remote, NEED AltitudeHoldBaro AND AltitudeHoldRangeFinder
  85.  
  86. #define UseGPS // Try to auto-detect the GPS, may have some detection trouble making the connection to the configurator not working
  87. #define UseGPSNavigator // EXPERIMENTAL NEED UseGPS TO BE DEFINED, enable GPS position hold, auto return home when no mission or execute mission
  88.  
  89. //
  90. // *******************************************************************************************************************************
  91. // Battery Monitor Options
  92. // For more information on how to setup Battery Monitor please refer to http://aeroquad.com/showwiki.php?title=BatteryMonitor+h
  93. // *******************************************************************************************************************************
  94. //#define BattMonitor            // Enable Battery monitor
  95. //#define BattMonitorAutoDescent // NEED BattMonitor defined. if you want the craft to auto descent when the battery reach the alarm voltage
  96. //#define POWERED_BY_VIN         // NEED BattMonitor defined. Uncomment this if your v2.x is powered directly by the vin/gnd of the arduino
  97. //
  98. // Advanced configuration. Please refer to wiki for instructions
  99. //#define BattCustomConfig DEFINE_BATTERY( 3,0,15,0,2,50,0)
  100.  
  101. //
  102. // *******************************************************************************************************************************
  103. // Optional Receiver
  104. // *******************************************************************************************************************************
  105. #define NormalReceiver // this do nothing really but, it indicate users that they don't have to define other option here if they have a normal receiver
  106. //#define RemotePCReceiver // EXPERIMENTAL Use PC as transmitter via serial communicator with XBEE
  107. //#define ReceiverSBUS  // Use a Futaba sBUS RX, connect sBUS data line to Serial2 RX, supports up to 8 channels
  108. //#define ReceiverPPM // Use a ppm receiver
  109. //#define ReceiverHWPPM // Use a ppm receiver with HW timer, needs a HW modification (see Libraries/AQ_Receiver/Receiver_HWPPM.h)
  110. // You need to select one of these channel order definitions for PPM receiver
  111. //#define SKETCH_SERIAL_SUM_PPM SERIAL_SUM_PPM_1 //For Graupner/Spektrum (DEFAULT)
  112. #define SKETCH_SERIAL_SUM_PPM SERIAL_SUM_PPM_2 //For Robe/Hitec/Futaba
  113. //#define SKETCH_SERIAL_SUM_PPM SERIAL_SUM_PPM_3 //For some Hitec/Sanwa/Others
  114.  
  115. //#define UseRSSIFaileSafe // read rssi for receiver failsafe NEED A RECEIVER WITH FAILSAVE CONNECTED ON PIN A6 OF THE SHIELD
  116.  
  117. //
  118. // *******************************************************************************************************************************
  119. // Define how many channels are connected from your R/C receiver
  120. // Please note that the flight software currently only supports 6 channels, additional channels will be supported in the future
  121. // Additionally 8 receiver channels are only available when not using the Arduino Uno
  122. // *******************************************************************************************************************************
  123. //#define LASTCHANNEL 6
  124. #define LASTCHANNEL 8 // - warning, this needs to be debugged, incorrect COM behaviour appears when selecting this
  125.  
  126.  
  127. //
  128. // *******************************************************************************************************************************
  129. // Optional telemetry (for debug or ground station tracking purposes)
  130. // For more information on how to setup Telemetry please refer to http://aeroquad.com/showwiki.php?title=Xbee+Installation
  131. // *******************************************************************************************************************************
  132. //#define WirelessTelemetry  // Enables Wireless telemetry on Serial3  // Wireless telemetry enable
  133.  
  134. //
  135. // *******************************************************************************************************************************
  136. // Optional audio channel telemetry (for ground station tracking purposes)
  137. // This will output telemetry at slow (1200baud) rate once per second on Serial2.
  138. // *******************************************************************************************************************************
  139. //#define SlowTelemetry  // Enables Wireless telemetry on Serial2
  140.  
  141.  
  142. //
  143. // *******************************************************************************************************************************
  144. // Camera Stabilization
  145. // Servo output goes to D11(pitch), D12(roll), D13(yaw) on AeroQuad v1.8 shield
  146. // If using v2.0 Shield place jumper between:
  147. // D12 to D33 for roll, connect servo to SERVO1
  148. // D11 to D34 for pitch, connect servo to SERVO2
  149. // D13 to D35 for yaw, connect servo to SERVO3
  150. // Please note that you will need to have battery connected to power on servos with v2.0 shield
  151. // *******************************************************************************************************************************
  152. //#define CameraControl
  153.  
  154. //
  155. // *******************************************************************************************************************************
  156. // On screen display implementation using MAX7456 chip. See MAX7456.h in libraries for more info and configuration.
  157. // For more information on how to setup OSD please refer to http://aeroquad.com/showwiki.php?title=On-Screen-Display
  158. // *******************************************************************************************************************************
  159. //#define OSD
  160. //#define ShowRSSI
  161. //#define PAL                       // uncomment this to default to PAL video
  162. //#define AUTODETECT_VIDEO_STANDARD // detect automatically, signal must be present at Arduino powerup!
  163. //#define CALLSIGN "Aeroquad"         // Show (optional) callsign
  164. //#define ShowAttitudeIndicator     // Display the attitude indicator calculated by the AHRS
  165. //#define USUnits                   // Enable for US units (feet,miles,mph)
  166.  
  167. //#define OSD_SYSTEM_MENU           // Menu system, currently only usable with OSD
  168.  
  169. /****************************************************************************
  170.  ****************************************************************************
  171.  ****************************************************************************
  172.  ********************* End of User Definition Section ***********************
  173.  ****************************************************************************
  174.  ****************************************************************************
  175.  ****************************************************************************/