View Single Post
  #1   Spotlight this post!  
Unread 05-03-2015, 09:48
ashb1025 ashb1025 is offline
Registered User
FTC #6095
 
Join Date: Feb 2014
Location: New Castle, IN
Posts: 11
ashb1025 is an unknown quantity at this point
Autonomous Programming Help

Hello, I'm writing the code for our FTC bot in RobotC and I have ran into a bit of trouble trying to optimize the code a bit, I want to be able to define to variable for on string of code in my function like this

void goForward(const int Speed, nTime)
{
motor[1] = Speed;
wait1MSec(nTime);
}

basically so I can define the speed and how long it runs in the main task without editing the function, but the above code doesn't seem to work, and would greatly appreciate any help.