View Single Post
  #4   Spotlight this post!  
Unread 17-02-2015, 16:09
King Nerd III's Avatar
King Nerd III King Nerd III is offline
Chief Programmer/Head of Autonomous
AKA: Isaac
FRC #1410 (The Kraken)
Team Role: Programmer
 
Join Date: Jan 2014
Rookie Year: 2014
Location: Denver, CO
Posts: 113
King Nerd III is an unknown quantity at this point
Re: Problem With Talon SRX Enabling

Quote:
Originally Posted by ozrien View Post
Hey Jefferson, I think I have it figured out. Seems like calling joystick routines in the disabled loop has the undesired effect of causing the RIO's backend to crash/restart on power boot. It only happens once and doesn't affect much since the robot is booting up anyway. But there is a moment where when the CANTalon's object constructor's set up their messages, there is no one listening at the other end.

If you're grabbing joystick values in disabled() and using CAN Actuators I recommend calling one of the setXXX() routines on each CAN Actuator in the disabled loop. That way if this problem occurs, the code will periodically signal to the back end that those CAN objects exist and should be enabled. I reproduced your problem and tested the workaround.

So for your two CANTalons (or just do all of them), try calling set(0) in the disabled loop so that on-power-boot they get reregistered ok.
Could this possibly be what is causing our Talons to not enable? We don't have a disabled portion in our command based framework, but could easily add one if it would help.
Reply With Quote