View Single Post
  #6   Spotlight this post!  
Unread 20-02-2011, 01:42
CodeMonkeyMatt CodeMonkeyMatt is offline
Registered User
FRC #2605
 
Join Date: Jan 2011
Rookie Year: 2008
Location: WA
Posts: 46
CodeMonkeyMatt is on a distinguished road
Re: Victors not working please help

Actually dboisvert, I suspect that tomy's writing his code based off the simple robot class, which doesn't use pointers, but creates objects directly. For that the syntax would be*:
Code:
Victor vicShoulder;
Then at the robot constructor:
Code:
RobotClassName():
vicShoulder(slotNum, portNum)
{
...
And then to use it:
Code:
vicShoulder.Set(speed);
Someone correct me if I'm wrong, especially tomy if this isn't how you're attempting to run the Victor.

I agree on your other points though. I don't know how many times I've forgotten to turn off a motor, or how many times I've poured through my code only to discover an electrical failure was the problem.

Also agree with theprgramerdude, more code = more help.


*This was from memory, so it might be off a little. Idea's the same though.
Reply With Quote