Subversion Repositories FlightCtrl

Rev

Rev 2070 | Rev 2164 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2070 Rev 2117
Line 95... Line 95...
95
*/
95
*/
Line 96... Line 96...
96
 
96
 
97
/*****************************************************
97
/*****************************************************
98
 * Control Servo Position
98
 * Control Servo Position
99
 *****************************************************/
-
 
100
 
-
 
101
/*typedef struct {
-
 
102
  uint8_t manualControl;
-
 
103
  uint8_t compensationFactor;
-
 
104
  uint8_t minValue;
-
 
105
  uint8_t maxValue;
-
 
106
  uint8_t flags;
-
 
107
} servo_t;*/
-
 
108
 
99
 *****************************************************/
109
int16_t calculateStabilizedServoAxis(uint8_t axis) {
100
int16_t calculateStabilizedServoAxis(uint8_t axis) {
110
  int32_t value = attitude[axis] >> STABILIZATION_LOG_DIVIDER; // between -500000 to 500000 extreme limits. Just about
101
  int32_t value = attitude[axis] >> STABILIZATION_LOG_DIVIDER; // between -500000 to 500000 extreme limits. Just about
111
  // With full blast on stabilization gain (255) we want to convert a delta of, say, 125000 to 2000.
102
  // With full blast on stabilization gain (255) we want to convert a delta of, say, 125000 to 2000.
112
  // That is a divisor of about 1<<14. Same conclusion as H&I.
103
  // That is a divisor of about 1<<14. Same conclusion as H&I.