Quadcopter software. Flying - Contact me for more details or a copy of the PC ground station code

Dependencies:   ConfigFile PID PPM MODSERIAL mbed-rtos mbed MaxbotixDriver TinyGPS filter

Revision:
7:bc5822aa8878
Parent:
6:4c207e7b1203
Child:
9:7b194f83e567
--- a/flightController.h	Thu Jan 22 18:03:22 2015 +0000
+++ b/flightController.h	Tue Feb 10 20:55:44 2015 +0000
@@ -109,8 +109,8 @@
 
     //Calculate motor power if flying
     //RC Mapped thottle is between 0 and 1
-    //Add 0.1 to try to avoid false starts
-    if(_rcMappedCommands[3] > (RC_THRUST_MIN + 0.1) && _armed == true)
+    //Add 0.2 to try to avoid false starts
+    if(_rcMappedCommands[3] > (RC_THRUST_MIN + 0.2) && _armed == true)
     {
         //Calculate base power to apply from throttle - returns 1060 at min, 1860 at max
         float basePower = MOTORS_MIN + (_rcMappedCommands[3] * 800);
@@ -125,6 +125,7 @@
         float motorFix = 0;
         float motorMin = _motorPower[0];
         float motorMax = _motorPower[0];
+        
         for(int i=1; i<4; i++)
         {
             if(_motorPower[i] < motorMin) motorMin = _motorPower[i];
@@ -186,8 +187,8 @@
     //Use the 2 spare channels to alter the offset
     if(_levelOffset == true)
     {
-        float pitchOffset =_channel7MedianFilter->process(Map(_rcCommands[6], RC_OUT_MIN, RC_OUT_MAX, -5, 5));
-        float rollOffset =_channel8MedianFilter->process(Map(_rcCommands[7], RC_OUT_MIN, RC_OUT_MAX, -5, 5));
+        float pitchOffset = /*_channel7MedianFilter->process(*/Map(_rcCommands[6], RC_OUT_MIN, RC_OUT_MAX, -5, 5);//);
+        float rollOffset = /*_channel8MedianFilter->process(*/Map(_rcCommands[7], RC_OUT_MIN, RC_OUT_MAX, -5, 5);//);
         
         _zeroValues[1] = _oldZeroValues[1] + pitchOffset;
         _zeroValues[2] = _oldZeroValues[2] + rollOffset;