Thread: Talon Motors
View Single Post
  #3   Spotlight this post!  
Unread 17-01-2013, 11:26
Doron_Sivan Doron_Sivan is offline
Registered User
FRC #4590 (GreenBlitz)
Team Role: Programmer
 
Join Date: Oct 2012
Rookie Year: 2013
Location: Israel
Posts: 11
Doron_Sivan is an unknown quantity at this point
Re: Talon Motors

You can declare a Talon in C++ by writing
Talon t1 = new Talon(TALON_PORT);
when TALON_PORT is an int for the port.

Beaware that the RobotDrive class automatically initiallize jaguars when declaring the defult constructor (when the parameters are numbers).
So when you use Talons don't decalre it like this:

RobotDrive drive = new RobotDrive(1, 2, 3, 4);

but like this
RobotDrive drive = new RobotDrive(new Talon(1), new Talon(2), new Talon(3), new Talon(4));

Doron
Reply With Quote