View Single Post
  #7   Spotlight this post!  
Unread 28-01-2017, 16:48
thatnameistaken thatnameistaken is offline
Registered User
AKA: Joshua Johnston
FRC #2191 (Flux Core)
Team Role: College Student
 
Join Date: Oct 2012
Rookie Year: 2013
Location: Hamilton, NJ
Posts: 62
thatnameistaken is on a distinguished road
Re: Get Control Mode from Talon SRX

Quote:
Originally Posted by robot_rover View Post
Currently I was trying to get the control mode to see if it needed to be changed in teleop. When our bot is in auto it sets the mode to position. What I was trying to do was set the mode to speed in the teleop vi only if it wasn't already in Speed mode. Right now I have a workaround where it only runs the change mode code if the bot has been disabled since the last time the teleop vi was called.
If you always want speed mode in teleop, you could just set it to speed regardless of mode. There's no issue with redundant mode change calls.

Edit: what Mark said above would also work for the way you're trying to go about it.

Edit again: Additionally, if you're only changing out of speed mode in auto, another solution would be to set the talons to speed mode at the very end of the routine.

Last edited by thatnameistaken : 28-01-2017 at 16:51.
Reply With Quote