Subversion Repositories FlightCtrl

Rev

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

Rev 1623 Rev 1645
Line 257... Line 257...
257
    if(externalControl.throttle < stickThrottle) stickThrottle = externalControl.throttle;
257
    if(externalControl.throttle < stickThrottle) stickThrottle = externalControl.throttle;
258
  }
258
  }
Line 259... Line 259...
259
 
259
 
Line 260... Line 260...
260
  if(stickThrottle < 0) stickThrottle = 0;
260
  if(stickThrottle < 0) stickThrottle = 0;
261
 
261
 
262
  if(abs(stickPitch / STICK_GAIN) > maxStickPitch) {
262
  if(abs(stickPitch / CONTROL_SCALING) > maxStickPitch) {
263
    maxStickPitch = abs(stickPitch) / STICK_GAIN;
263
    maxStickPitch = abs(stickPitch) / CONTROL_SCALING;
264
    if(maxStickPitch > 100) maxStickPitch = 100;
264
    if(maxStickPitch > 100) maxStickPitch = 100;
Line 265... Line 265...
265
  }
265
  }
266
  else if (maxStickPitch) maxStickPitch--;
266
  else if (maxStickPitch) maxStickPitch--;
267
 
267
 
268
  if(abs(stickRoll / STICK_GAIN) > maxStickRoll) {
268
  if(abs(stickRoll / CONTROL_SCALING) > maxStickRoll) {
269
    maxStickRoll = abs(stickRoll) / STICK_GAIN;
269
    maxStickRoll = abs(stickRoll) / CONTROL_SCALING;
Line 270... Line 270...
270
    if(maxStickRoll > 100) maxStickRoll = 100;
270
    if(maxStickRoll > 100) maxStickRoll = 100;