Go to Post looks like he was getting ready for a sprint! be careful chuck, its only like 2 feet from the line to the controls... - vivek16 [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #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.
 


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 01:52.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi