View Single Post
  #18   Spotlight this post!  
Unread 16-04-2015, 11:27
Arhowk's Avatar
Arhowk Arhowk is offline
FiM CSA
AKA: Jake Niman
FRC #1684 (The Chimeras) (5460 Mentor)
 
Join Date: Jan 2013
Rookie Year: 2013
Location: Lapeer
Posts: 544
Arhowk is a splendid one to beholdArhowk is a splendid one to beholdArhowk is a splendid one to beholdArhowk is a splendid one to beholdArhowk is a splendid one to beholdArhowk is a splendid one to behold
Re: Javascript Robots!

Quote:
Originally Posted by JesseK View Post
If you're talking about intuitive design, Talon's don't have 3 ports - PWMs do. It'd get particularly sticky if you had to do Talon SR vs SRX vs SP. I'd recommend doing robot.pwm.port3.set(1), then at instantiation determine what port 3 actually is and make sure that object has a set() method.
I don't know if the roboRIO does this but I know you couldn't with the sidecar because jaguars and talons/victors took different PWM wavelengths. The most intuitive would be something like this

Code:
robot.elevatorMotor = robot.pwm.port3
or, if you have to

Code:
robot.elevatorMotor = HAL.getMotor(3)