View Single Post
  #4   Spotlight this post!  
Unread 26-06-2012, 20:08
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: Code Check Please!

Thanks for the help. I looked at all of your comments, and went through my code again.
  • I don't really have a problem with the name as it doesn't bother me, but I could see what you mean.
  • I have seen online a lot of programmers define the port numbers for buttons and other stuff. I could always do that, but the way it is does not bother me much, though I do agree it would look nicer.
  • In regard to making multiple classes. I have thought about doing that over the past few days, but I haven't had the time to really go at it, and I wanted to get some responses to this post so I knew the stuff looked okay first.
  • I switched that comment in autonomous. Thank you! I didn't even notice it before.
  • I got rid of that for loop in autonomous. It really didn't have any purpose.
  • I changed the name of the timers. I agree they weren't very descriptive names, but they worked.
  • I fixed those spots that had the while loops with the delays. Thank you very much for helping me out with this. Your way is very nice.
  • I do agree it does look awkward in code using "==true" or "==false," but it's just the way I have done booleans in learning java this past year in AP Computer Science. It's just how i do it.
  • I also set the watchdog to false in autonomous, and to true in teleop.

Thank you for all your suggestions and help!

The new code is available here: http://code.google.com/p/jared-1751-...ource/checkout
Reply With Quote