Subversion Repositories FlightCtrl

Rev

Rev 701 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 701 Rev 703
Line 66... Line 66...
66
  if(!timer--)
66
  if(!timer--)
67
    {
67
    {
68
                 // enable PWM on PD7 in non inverting mode
68
                 // enable PWM on PD7 in non inverting mode
69
                 TCCR2A = (TCCR2A & 0x3F)|(1<<COM2A1)|(0<<COM2A0);
69
                 TCCR2A = (TCCR2A & 0x3F)|(1<<COM2A1)|(0<<COM2A0);
Line 70... Line 70...
70
 
70
 
71
                 ServoValue =  Parameter_ServoPitchControl;
71
                 ServoValue =  FCParam.ServoPitchControl;
72
                 // inverting movment of servo
72
                 // inverting movment of servo
73
                 if(ParamSet.ServoPitchCompInvert & 0x01)
73
                 if(ParamSet.ServoPitchCompInvert & 0x01)
74
                 {
74
                 {
75
                         ServoValue += ((int32_t) ParamSet.ServoPitchComp * (IntegralPitch / 128)) / 512;
75
                         ServoValue += ((int32_t) ParamSet.ServoPitchComp * (IntegralPitch / 128)) / 512;