View Single Post
  #5   Spotlight this post!  
Unread 08-03-2004, 20:20
Ian W. Ian W. is offline
College? What?
no team (Gompei and the Herd)
Team Role: College Student
 
Join Date: Jan 2002
Rookie Year: 2002
Location: Worcester, MA | Smithtown, NY
Posts: 1,464
Ian W. is a name known to allIan W. is a name known to allIan W. is a name known to allIan W. is a name known to allIan W. is a name known to allIan W. is a name known to all
Send a message via AIM to Ian W.
Re: Do you write functions for your code?

Quote:
Originally Posted by maxlobovsky
My team's code is pretty simple this year so we just slapped our series of if statements for autonomous and a couple of independent if statements for user_routines inside the normal functions without changing much, but i was curious how many other coders actually did things nice and proper and wrote functions and such. If so, where do you put them and what have you found the most convenient?
I did what made logical sense to me. Any similar robot functions were grouped together into an actual code function.

I believe I had one for drive motors, one for an arm motor, one for all of our solenoids, and one for our compressor. And then some more random small ones that I don't even remember what they did.

Functions keep things cleaner, and if you have the time to set it up, use it.
__________________
AIM --> Woloi
Email --> ian@woloschin.com