|
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...
|