View Single Post
  #4   Spotlight this post!  
Unread 22-02-2004, 22:06
Jeff McCune's Avatar
Jeff McCune Jeff McCune is offline
Alpha Geek
#0677 (The Wirestrippers)
Team Role: Mentor
 
Join Date: Jan 2003
Location: The Ohio State University
Posts: 67
Jeff McCune is on a distinguished road
Send a message via ICQ to Jeff McCune Send a message via AIM to Jeff McCune
Re: streamlining IR code

I implemented my own receiver and tracker code last night and today, heavily modeled after Kevin's code. I generalized the receiver code such that all receiver interrupt pins call the same function and just pass a pointer to an ir_receiver structure which has all the necessary elements in it.

The tracker code likewise takes a pointer to a tracker structure, which in our code contains pointers to 3 receiver structures.

There were no problems re-working kevin's code to my own. He had already structured it well enough to be a single function, not quite sure why he didn't just generalize it to being with. I guess it's much more readable and understandable to people who aren't familiar with multiple levels of pointer dereferencing and passing.
__________________
Team 677 - The Wirestrippers - Columbus School for Girls and The Ohio State University
EMAIL: mccune@ling.ohio-state.edu

...And all you touch and all you see
Is all your life will ever be...