diff --git a/Arducopter/ArduCopter.h b/Arducopter/ArduCopter.h index 3b868264aa..6a79b42d8e 100644 --- a/Arducopter/ArduCopter.h +++ b/Arducopter/ArduCopter.h @@ -30,10 +30,6 @@ /**************************************************************/ // Special features that might disapear in future releases -//#define jpframe // This is only Jani's special frame, you should never use unless you know what you are doing - // As default this should be always checked off. - - /* APM Hardware definitions */ #define LED_Yellow 36 #define LED_Red 35 @@ -54,17 +50,9 @@ uint8_t sensors[6] = {1, 2, 0, 4, 5, 6}; // For ArduPilot Mega Sensor Shield Hardware // Sensor: GYROX, GYROY, GYROZ, ACCELX, ACCELY, ACCELZ, MAGX, MAGY, MAGZ - -#ifndef jpframe -int SENSOR_SIGN[]={ - 1, -1, -1, -1, 1, 1, -1, -1, -1}; - //{-1,1,-1,1,-1,1,-1,-1,-1}; -#else int SENSOR_SIGN[]={ 1, -1, 1, -1, 1, 1, -1, -1, -1}; //{-1,1,-1,1,-1,1,-1,-1,-1}; -#endif - /* APM Hardware definitions, END */ /* General definitions */ @@ -265,4 +253,4 @@ long tlmTimer = 0; // Arming/Disarming uint8_t Arming_counter=0; -uint8_t Disarming_counter=0; +uint8_t Disarming_counter=0; diff --git a/Arducopter/Arducopter.pde b/Arducopter/Arducopter.pde index f21082478a..a800c4b97e 100644 --- a/Arducopter/Arducopter.pde +++ b/Arducopter/Arducopter.pde @@ -57,8 +57,6 @@ #define CONFIGURATOR // Do se use Configurator or normal text output over serial link - - /**********************************************/ // Not in use yet, starting to work with battery monitors and pressure sensors. // Added 19-08-2010 @@ -72,8 +70,8 @@ /* User definable modules - END */ // Frame build condiguration -//#define FLIGHT_MODE_+ // Traditional "one arm as nose" frame configuration -#define FLIGHT_MODE_X // Frame orientation 45 deg to CCW, nose between two arms +#define FLIGHT_MODE_+ // Traditional "one arm as nose" frame configuration +//#define FLIGHT_MODE_X // Frame orientation 45 deg to CCW, nose between two arms /* ****************************************************************************** */ @@ -99,7 +97,7 @@ #include "UserConfig.h" /* Software version */ -#define VER 1.32 // Current software version (only numeric values) +#define VER 1.33 // Current software version (only numeric values) /* ***************************************************************************** */ @@ -631,7 +629,7 @@ void loop(){ control_yaw = 0; command_rx_yaw = ToDeg(yaw); command_rx_yaw_diff = 0; - if (ch_yaw > 1800) { + if (ch_yaw < 1200) { if (Arming_counter > ARM_DELAY){ motorArmed = 1; minThrottle = 1100; @@ -642,7 +640,7 @@ void loop(){ else Arming_counter=0; // To Disarm motor output : Throttle down and full yaw left for more than 2 seconds - if (ch_yaw < 1200) { + if (ch_yaw > 1800) { if (Disarming_counter > DISARM_DELAY){ motorArmed = 0; minThrottle = MIN_THROTTLE; @@ -659,7 +657,6 @@ void loop(){ } // Quadcopter mix - // Ask Jose if we still need this IF statement, and if we want to do an ESC calibration if (motorArmed == 1) { #ifdef IsAM digitalWrite(FR_LED, HIGH); // AM-Mode @@ -671,10 +668,10 @@ void loop(){ backMotor = constrain(ch_throttle - control_pitch + control_yaw, minThrottle, 2000); #endif #ifdef FLIGHT_MODE_X - frontMotor = constrain(ch_throttle + control_roll + control_pitch - control_yaw, minThrottle, 2000); // front left motor - rightMotor = constrain(ch_throttle - control_roll + control_pitch + control_yaw, minThrottle, 2000); // front right motor - leftMotor = constrain(ch_throttle + control_roll - control_pitch + control_yaw, minThrottle, 2000); // rear left motor - backMotor = constrain(ch_throttle - control_roll - control_pitch - control_yaw, minThrottle, 2000); // rear right motor + rightMotor = constrain(ch_throttle - control_roll + control_pitch - control_yaw, minThrottle, 2000); // front right motor + leftMotor = constrain(ch_throttle + control_roll - control_pitch - control_yaw, minThrottle, 2000); // rear left motor + frontMotor = constrain(ch_throttle + control_roll + control_pitch + control_yaw, minThrottle, 2000); // front left motor + backMotor = constrain(ch_throttle - control_roll - control_pitch + control_yaw, minThrottle, 2000); // rear right motor #endif } if (motorArmed == 0) {