Subversion Repositories FlightCtrl

Rev

Rev 1775 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1775 Rev 1821
Line 32... Line 32...
32
  } else
32
        } else
33
    /*
33
                /*
34
     * We need delta throttle = constant/projection1
34
                 * We need delta throttle = constant/projection1
35
     * (constant * MATH_UNIT_FACTOR^2) / projection.
35
                 * (constant * MATH_UNIT_FACTOR^2) / projection.
36
     */
36
                 */
-
 
37
                deltaThrottle = ((int32_t) effect * (int32_t) MATH_UNIT_FACTOR
37
    deltaThrottle = ((int32_t)effect * (int32_t)MATH_UNIT_FACTOR * (int32_t)MATH_UNIT_FACTOR) / (projection / 10)  - effect * 10;
38
                                * (int32_t) MATH_UNIT_FACTOR) / (projection / 10) - effect * 10;
38
  // DebugOut.Analog[13] = deltaThrottle;
39
        // DebugOut.Analog[13] = deltaThrottle;
Line 39... Line 40...
39
 
40
 
40
  return throttle + deltaThrottle;
41
        return throttle + deltaThrottle;
41
}
42
}