Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   C/C++ (http://www.chiefdelphi.com/forums/forumdisplay.php?f=183)
-   -   C++ Motor contorls (http://www.chiefdelphi.com/forums/showthread.php?t=92205)

excel2474 18-02-2011 15:23

C++ Motor contorls
 
So this is a really simple question. How do you control the value of the victors and jaguars in C++? I can't seem to find any documentation of the functions so I'm a little confused. I would think it would be something like:

myvictor.set();........ or
myjag.set();.....

I'm pretty familiar with C++, I'm just not sure what functions are already created for these and what arguments need to be passed. Thanks for the help.

davidalln 18-02-2011 16:48

Re: C++ Motor contorls
 
Yes, you are correct. Setting both a jag and a victor look like the following:

Code:

myVictor.Set(0.5);
myJag.Set(0.5);

Where the parameter is a floating point number between -1.0 and 1.0.

Whenever you don't know which function to call, take a look at either the WPILib source code or the doxygen documentation. It will tell you which classes can run what.

excel2474 18-02-2011 22:22

Re: C++ Motor contorls
 
Thanks for the help.


All times are GMT -5. The time now is 12:58.

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