View Single Post
  #1   Spotlight this post!  
Unread 01-30-2006, 07:39 PM
EricWilliams EricWilliams is offline
Registered User
FRC #2039 (Rockford Robotics)
Team Role: Mentor
 
Join Date: Mar 2005
Rookie Year: 2001
Location: Rockford, IL
Posts: 102
EricWilliams is a glorious beacon of lightEricWilliams is a glorious beacon of lightEricWilliams is a glorious beacon of lightEricWilliams is a glorious beacon of lightEricWilliams is a glorious beacon of lightEricWilliams is a glorious beacon of light
Acceleration Curve

We used an acceleration curve to overcome the sensitivity of the low range of the joystick. The code looks exactly like this:

Code:
tempRight = pwm13 = pwm14 = Limit_Mix(2000 + p1_y + p1_x - 127);
tempLeft = pwm15 = pwm16 = Limit_Mix(2000 + p1_y - p1_x + 127);
  
  if(p1_y >= 127){
    tempRight = (tempRight - 127)(tempRight - 127)/127 + 127;
    tempLeft = (tempLeft - 127)(tempLeft - 127)/127 + 127;
  }
  if(p1_y < 127){
    tempRight = (tempRight - 127)(tempRight - 127)/-127 + 127;
    tempLeft = (tempLeft - 127)(tempLeft - 127)/-127 + 127;
  }

  pwm13 = pwm14 = tempRight;
  pwm15 = pwm16 = tempLeft;
When building, the compiler gives error 1202: Call of non-function, on the 4 lines inside the if statements.

I'm completely stumped, any help would be greatly appreciated.