![]() |
Talon Motors
How do you declare talon motors in a program?
I looked around but couldn't find any info on this. |
Re: Talon Motors
You just declare them like as with victors and jaguars- They use the same PWM signal.
Code:
Jaguar *motora;Code:
motora = new Jaguar(1); |
Re: Talon Motors
In Java there is a Talon Class, there isn't a similar one under C++?
The Java implementation has different max,min, and deadband values for each of the motor controller used for generating the PWM signal. So while, interchanging them may work, it may not be completely correct, at least on the Java side. |
Re: Talon Motors
Quote:
Quote:
|
Re: Talon Motors
Quote:
All of the programmers on our team are completely new to FRC, so we are still learning a lot. |
Re: Talon Motors
Quote:
|
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 |
Re: Talon Motors
Also, is the min/max values for the talons the same as jaguars?
If not, what are the min/max values? |
Re: Talon Motors
They're the same. -1 to 1.
|
Re: Talon Motors
Quote:
|
Re: Talon Motors
FWIW, under the hood they are not the same. Jag and Talon expect different min/max pulse widths. That's why WPILib provides separate drivers for them. |
Re: Talon Motors
Quote:
|
Re: Talon Motors
Quote:
|
| All times are GMT -5. The time now is 12:30. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi