mirror of https://github.com/ArduPilot/ardupilot
uncrustify ArduCopter/defines.h
This commit is contained in:
parent
d0e48755ab
commit
b9ba41c12a
|
@ -24,7 +24,8 @@
|
|||
#define ROLL_PITCH_ACRO 1
|
||||
#define ROLL_PITCH_AUTO 2
|
||||
#define ROLL_PITCH_STABLE_OF 3
|
||||
#define ROLL_PITCH_TOY 4 // THOR This is the Roll and Pitch mode
|
||||
#define ROLL_PITCH_TOY 4 // THOR This is the Roll and Pitch
|
||||
// mode
|
||||
|
||||
#define THROTTLE_MANUAL 0
|
||||
#define THROTTLE_HOLD 1
|
||||
|
@ -130,7 +131,8 @@
|
|||
#define CIRCLE 7 // AUTO control
|
||||
#define POSITION 8 // AUTO control
|
||||
#define LAND 9 // AUTO control
|
||||
#define OF_LOITER 10 // Hold a single location using optical flow sensor
|
||||
#define OF_LOITER 10 // Hold a single location using optical flow
|
||||
// sensor
|
||||
#define TOY_A 11 // THOR Enum for Toy mode
|
||||
#define TOY_M 12 // THOR Enum for Toy mode
|
||||
#define NUM_MODES 13
|
||||
|
@ -198,8 +200,10 @@
|
|||
#define NAV_DELAY 4
|
||||
|
||||
|
||||
// Commands - Note that APM now uses a subset of the MAVLink protocol commands. See enum MAV_CMD in the GCS_Mavlink library
|
||||
#define CMD_BLANK 0 // there is no command stored in the mem location requested
|
||||
// Commands - Note that APM now uses a subset of the MAVLink protocol
|
||||
// commands. See enum MAV_CMD in the GCS_Mavlink library
|
||||
#define CMD_BLANK 0 // there is no command stored in the mem location
|
||||
// requested
|
||||
#define NO_COMMAND 0
|
||||
|
||||
|
||||
|
@ -207,7 +211,8 @@
|
|||
#define WP_MODE 2
|
||||
#define CIRCLE_MODE 3
|
||||
#define NO_NAV_MODE 4
|
||||
#define TOY_MODE 5 // THOR This mode defines the Virtual WP following mode
|
||||
#define TOY_MODE 5 // THOR This mode defines the Virtual
|
||||
// WP following mode
|
||||
|
||||
// TOY mixing options
|
||||
#define TOY_LOOKUP_TABLE 0
|
||||
|
@ -326,7 +331,8 @@ enum gcs_severity {
|
|||
#define EVENT_LOOP 4
|
||||
|
||||
// Climb rate calculations
|
||||
#define ALTITUDE_HISTORY_LENGTH 8 //Number of (time,altitude) points to regress a climb rate from
|
||||
#define ALTITUDE_HISTORY_LENGTH 8 //Number of (time,altitude) points to
|
||||
// regress a climb rate from
|
||||
|
||||
#define BATTERY_VOLTAGE(x) (x*(g.input_voltage/1024.0))*g.volt_div_ratio
|
||||
#define CURRENT_AMPS(x) ((x*(g.input_voltage/1024.0))-CURR_AMPS_OFFSET)*g.curr_amp_per_volt
|
||||
|
@ -336,23 +342,33 @@ enum gcs_severity {
|
|||
/* ************************************************************** */
|
||||
/* Expansion PIN's that people can use for various things. */
|
||||
|
||||
// AN0 - 7 are located at edge of IMU PCB "above" pressure sensor and Expansion port
|
||||
// AN0 - 7 are located at edge of IMU PCB "above" pressure sensor and
|
||||
// Expansion port
|
||||
// AN0 - 5 are also located next to voltage dividers and sliding SW2 switch
|
||||
// AN0 - 3 has 10kOhm resistor in serial, include 3.9kOhm to make it as voltage divider
|
||||
// AN4 - 5 are direct GPIO pins from atmega1280 and they are the latest pins next to SW2 switch
|
||||
// AN0 - 3 has 10kOhm resistor in serial, include 3.9kOhm to make it as
|
||||
// voltage divider
|
||||
// AN4 - 5 are direct GPIO pins from atmega1280 and they are the latest pins
|
||||
// next to SW2 switch
|
||||
// Look more ArduCopter Wiki for voltage dividers and other ports
|
||||
#define AN0 54 // resistor, vdiv use, divider 1 closest to relay
|
||||
#define AN1 55 // resistor, vdiv use, divider 2
|
||||
#define AN2 56 // resistor, vdiv use, divider 3
|
||||
#define AN3 57 // resistor, vdiv use, divider 4 closest to SW2
|
||||
#define AN4 58 // direct GPIO pin, default as analog input, next to SW2 switch
|
||||
#define AN5 59 // direct GPIO pin, default as analog input, next to SW2 switch
|
||||
#define AN6 60 // direct GPIO pin, default as analog input, close to Pressure sensor, Expansion Ports
|
||||
#define AN7 61 // direct GPIO pin, default as analog input, close to Pressure sensor, Expansion Ports
|
||||
#define AN4 58 // direct GPIO pin, default as analog input, next to SW2
|
||||
// switch
|
||||
#define AN5 59 // direct GPIO pin, default as analog input, next to SW2
|
||||
// switch
|
||||
#define AN6 60 // direct GPIO pin, default as analog input, close to
|
||||
// Pressure sensor, Expansion Ports
|
||||
#define AN7 61 // direct GPIO pin, default as analog input, close to
|
||||
// Pressure sensor, Expansion Ports
|
||||
|
||||
// AN8 - 15 are located at edge of IMU PCB "above" pressure sensor and Expansion port
|
||||
// AN8 - 15 PINs are not connected anywhere, they are located as last 8 pins on edge of the board above Expansion Ports
|
||||
// even pins (8,10,12,14) are at edge of board, Odd pins (9,11,13,15) are on inner row
|
||||
// AN8 - 15 are located at edge of IMU PCB "above" pressure sensor and
|
||||
// Expansion port
|
||||
// AN8 - 15 PINs are not connected anywhere, they are located as last 8 pins
|
||||
// on edge of the board above Expansion Ports
|
||||
// even pins (8,10,12,14) are at edge of board, Odd pins (9,11,13,15) are on
|
||||
// inner row
|
||||
#define AN8 62 // NC
|
||||
#define AN9 63 // NC
|
||||
#define AN10 64 // NC
|
||||
|
@ -379,7 +395,8 @@ enum gcs_severity {
|
|||
// EEPROM addresses
|
||||
#define EEPROM_MAX_ADDR 4096
|
||||
// parameters get the first 1536 bytes of EEPROM, remainder is for waypoints
|
||||
#define WP_START_BYTE 0x600 // where in memory home WP is stored + all other WP
|
||||
#define WP_START_BYTE 0x600 // where in memory home WP is stored + all other
|
||||
// WP
|
||||
#define WP_SIZE 15
|
||||
|
||||
#define ONBOARD_PARAM_NAME_LENGTH 15
|
||||
|
@ -389,7 +406,11 @@ enum gcs_severity {
|
|||
#define FENCE_WP_SIZE sizeof(Vector2l)
|
||||
#define FENCE_START_BYTE (EEPROM_MAX_ADDR-(MAX_FENCEPOINTS*FENCE_WP_SIZE))
|
||||
|
||||
#define MAX_WAYPOINTS ((FENCE_START_BYTE - WP_START_BYTE) / WP_SIZE) - 1 // - 1 to be safe
|
||||
#define MAX_WAYPOINTS ((FENCE_START_BYTE - WP_START_BYTE) / WP_SIZE) - 1 // -
|
||||
// 1
|
||||
// to
|
||||
// be
|
||||
// safe
|
||||
|
||||
// mark a function as not to be inlined
|
||||
#define NOINLINE __attribute__((noinline))
|
||||
|
|
Loading…
Reference in New Issue