Go to Post The urge to compete tends to drive teams to hold the ideas close during the competition season, but the urge to contribute means they get publicized afterwards. - Alan Anderson [more]
Home
Go Back   Chief Delphi > FIRST > General Forum
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 15-02-2014, 17:20
Team3205 Team3205 is offline
Registered User
FRC #3205
 
Join Date: Feb 2014
Location: Concord
Posts: 13
Team3205 is an unknown quantity at this point
Commands immediately canceling

Hello, we have a command which runs a motor until a switch has been pressed. We want this functionality for another subsystem. We copy pasted the code from the first subsystem into the second subsystem changing ports names etc. We have buttons on smartdashboard which activate certain commands. When the first command is started it works fine. When the copyed command is started it automatically cancels. We have even tried making it so that the isFinished method always returns false but it still cancels instantly. Does anyone know what the problem might be?
Reply With Quote
  #2   Spotlight this post!  
Unread 15-02-2014, 17:54
AllenGregoryIV's Avatar
AllenGregoryIV AllenGregoryIV is offline
Engineering Coach
AKA: Allen "JAG" Gregory
FRC #3847 (Spectrum)
Team Role: Coach
 
Join Date: Jul 2008
Rookie Year: 2003
Location: Texas
Posts: 2,557
AllenGregoryIV has a reputation beyond reputeAllenGregoryIV has a reputation beyond reputeAllenGregoryIV has a reputation beyond reputeAllenGregoryIV has a reputation beyond reputeAllenGregoryIV has a reputation beyond reputeAllenGregoryIV has a reputation beyond reputeAllenGregoryIV has a reputation beyond reputeAllenGregoryIV has a reputation beyond reputeAllenGregoryIV has a reputation beyond reputeAllenGregoryIV has a reputation beyond reputeAllenGregoryIV has a reputation beyond repute
Send a message via AIM to AllenGregoryIV
Re: Commands immediately canceling

Please post part of your code, it's much harder to debug if we can't see it.

Do either command require a subsystem?
__________________

Team 647 | Cyber Wolf Corps | Alumni | 2003-2006 | Shoemaker HS
Team 2587 | DiscoBots | Mentor | 2008-2011 | Rice University / Houston Food Bank
Team 3847 | Spectrum | Coach | 2012-20... | St Agnes Academy
LRI | Alamo Regional | 2014-20...
"Competition has been shown to be useful up to a certain point and no further, but cooperation, which is the thing we must strive for today, begins where competition leaves off." - Franklin D. Roosevelt
Reply With Quote
  #3   Spotlight this post!  
Unread 16-02-2014, 09:25
Team3205 Team3205 is offline
Registered User
FRC #3205
 
Join Date: Feb 2014
Location: Concord
Posts: 13
Team3205 is an unknown quantity at this point
Re: Commands immediately canceling

Team3205_2014_1.01_Test_2.0.2.zip
Here is a zip file of all our code, specifically the areas where we are having this problem is the SuckBalls command, even though it looks identical to the Reload command. Thanks for any help.
Reply With Quote
  #4   Spotlight this post!  
Unread 16-02-2014, 09:48
Andrew Lobos Andrew Lobos is offline
Registered User
FRC #0225 (TechFire)
Team Role: Mentor
 
Join Date: Feb 2011
Rookie Year: 2011
Location: Lancaster, PA
Posts: 61
Andrew Lobos is a jewel in the roughAndrew Lobos is a jewel in the roughAndrew Lobos is a jewel in the rough
Re: Commands immediately canceling

Are you sure ballsucker.isSwitchSet() in isFinished() is returning what you think it is? If some electrical issue is making that always return true, your function will end after the first loop.

Besides going in with a multimeter, you can just throw a System.out.println(ballsucker.isSwitchSet()); in and see what the cRIO is getting. Logging to SmartDashboard could also get the job done
Reply With Quote
  #5   Spotlight this post!  
Unread 16-02-2014, 09:55
Team3205 Team3205 is offline
Registered User
FRC #3205
 
Join Date: Feb 2014
Location: Concord
Posts: 13
Team3205 is an unknown quantity at this point
Re: Commands immediately canceling

Fixed it thanks for your help!
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 18:31.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi