View Single Post
  #2   Spotlight this post!  
Unread 18-02-2016, 19:59
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,113
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: [C++] Problems running Sparks with Logitech controller

Your problem is simple (and very common). One button either sets the motors running or turns them off. So does the other button. So you're turning them on and off at essentially the same time.

The fix is simple too: only turn off the motors when both buttons are released. Move the .Set(0.0) lines to their own if statement that tests for (!collectButton && !fireButton).