View Single Post
  #11   Spotlight this post!  
Unread 02-04-2015, 10:21 PM
mmaunu's Avatar
mmaunu mmaunu is offline
Registered User
FRC #2485 (W.A.R. Lords)
Team Role: Mentor
 
Join Date: Mar 2013
Rookie Year: 2010
Location: San Diego, CA
Posts: 86
mmaunu is a jewel in the roughmmaunu is a jewel in the roughmmaunu is a jewel in the roughmmaunu is a jewel in the rough
Re: Limit Swtich Help

Quote:
Originally Posted by curtis0gj View Post
I have setup...
Code:
public class Robot extends SampleRobot {
    
            if(limitPressed) {
            	victor1.set(0);
            	victor2.set(0);
            } else if (xbox.getRawButton(4)) {
            	victor1.set(1);
            	victor2.set(1);
            } else {
            	victor1.set(0);
            	victor1.set(0);
            }
            if(xbox.getRawButton(1)) {
            	victor1.set(-1);
            	victor1.set(-1);
            } else {
A quick glance (I'll look longer later) shows that you have set victor1 twice in several places when you should be setting victor1 and victor2.

Ether: I have learned so much from reading your posts and papers over the years. I didn't intend to sound like I was correcting your post but merely adding explicit context for other readers.
__________________
2014 Las Vegas (Winners with 987, 2478; Excellence in Engineering)
2014 San Diego (Finalists with 987, 3250; Quality Award)
2013 Inland Empire (Winners with 1538, 968; Excellence in Engineering Award)
2013 San Diego (Finalists with 2984, 4322; Creativity Award)
2012 Las Vegas (Finalists with 2034, 3187; Quality Award)
Reply With Quote