Quote:
Originally Posted by Qbranch
But uhm, why does this need a 'driver' per se? Doesn't it just drive a pin high if a code is recognized? Just like reading buttons from the OI pannel or waiting for a limit switch?
|
You're correct, and I admit that's why it was so easy to write, but if this is doing something sophisticated on the robot, like adding 30 degrees to the position of an arm, it is easier to use these files because they have a little bit of brain to them--they will only give a 1 once per command, whereas if you printed out the value of the digital input, you would get something like (0,1,1,1,1,1,1,0,0,1,1 etc.). If you print the return value of IR_CommandReceived, you will get something like--to use the same example as earlier-- (0,1,0,0,0,0,0,0,0,1,0 etc.). It makes code look a little nicer, too.
Just figured I'd throw this out there. I really don't care if anyone uses it or not. At this point, if the rules stay the same as last year's, I'll have to re-write it come 1/5/08. Hopefully they change the programming/build window rule up a bit.
JBot