|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
|||
|
|||
|
Talon Motors
How do you declare talon motors in a program?
I looked around but couldn't find any info on this. |
|
#2
|
|||||
|
|||||
|
You just declare them like as with victors and jaguars- They use the same PWM signal.
Code:
Jaguar *motora; Code:
motora = new Jaguar(1); |
|
#3
|
|||
|
|||
|
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. |
|
#4
|
||||||
|
||||||
|
Re: Talon Motors
Quote:
If you use the Jaguar class with a Talon (and don't calibrate the Talon), you will end up with reduced range. |
|
#5
|
|||
|
|||
|
Re: Talon Motors
Quote:
All of the programmers on our team are completely new to FRC, so we are still learning a lot. |
|
#6
|
|||||
|
|||||
|
Actually, looking at the other people's posts, and realizing there actually is a Talon class in C++ (How did I miss that...) you might want to use the Talon class. Basically just substitute "Talon" for "Jaguar" for declaration and initialization, and everything else is the same.
|
|
#7
|
|||
|
|||
|
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 |
|
#8
|
|||
|
|||
|
Re: Talon Motors
Also, is the min/max values for the talons the same as jaguars?
If not, what are the min/max values? |
|
#9
|
||||
|
||||
|
Re: Talon Motors
They're the same. -1 to 1.
|
|
#10
|
|||
|
|||
|
Re: Talon Motors
|
|
#11
|
||||
|
||||
|
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. |
|
#12
|
|||
|
|||
|
Re: Talon Motors
but on the programming side they are the same?
|
|
#13
|
||||
|
||||
|
Re: Talon Motors
The purpose of the separate drivers is to present a common interface to the programmer.
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|