View Single Post
  #3   Spotlight this post!  
Unread 28-03-2012, 06:25
jhellr13 jhellr13 is offline
Registered User
FRC #4272
Team Role: Mentor
 
Join Date: Jan 2011
Rookie Year: 2010
Location: US
Posts: 187
jhellr13 is an unknown quantity at this point
Re: Check My Autonomous Code

Quote:
Originally Posted by RyanN View Post
Can you post your new code so I can take a look? My comment about the logic is that you have some stuff in there that doesn't do anything, and then some of it that doesn't do anything will cause your motor to keep running indefinitely.

Let me step you through your own logic.

We're looking at this code right here:
Attachment 12440

Let's clean it up to view everything a little better:
Attachment 12441

Now let's minimize the code, removing code that does nothing.
Step 1:
Attachment 12442

Step 2:
Attachment 12443

Step 3:
Attachment 12444

Please let me know if you do or do not understand this. The reason it all cancels out to a False is because you're using an AND gate, meaning both input X AND input Y must be True in order for the Output to be True.
Alright. I'll change that stuff later in the day. Sort of in a rush right now, but I attached my new code from last night.
Attached Files
File Type: zip Autonomous.zip (34.7 KB, 9 views)
Reply With Quote