View Single Post
  #4   Spotlight this post!  
Unread 12-02-2016, 23:22
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,112
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: Toggle or Digital Switches

Quote:
Originally Posted by NegaNexus View Post
When we disable, select another mode, and re-enable the program, it runs both cases at the same time.
Why do you think both are running? If it's just because both talon and talon1 are providing outputs, notice that nothing in your code ever turns either of them off. I think what's happening is that the first selected mode turns on one of the talons, then disabling the robot "turns it off", but it'll turn right back on again when the robot is reenabled. The second selected mode does its thing, ending up with both talons on.

You should probably set both talons to zero in autonomousInit() so you have a known starting state.
Reply With Quote