limiting the pitch throttle compensation

This commit is contained in:
Jason Short 2012-01-21 11:57:42 -08:00
parent fa06d4a2e3
commit 8f86caa3ff

View File

@ -321,9 +321,9 @@ static int get_angle_boost(int value)
{ {
float temp = cos_pitch_x * cos_roll_x; float temp = cos_pitch_x * cos_roll_x;
temp = 1.0 - constrain(temp, .5, 1.0); temp = 1.0 - constrain(temp, .5, 1.0);
// int16_t output = temp * value; int16_t output = temp * value;
// return constrain(output, 0, 100); return constrain(output, 0, 100);
return (int)(temp * value); // return (int)(temp * value);
} }
#define NUM_G_SAMPLES 40 #define NUM_G_SAMPLES 40