Here's a line of code that has been in Xtremachen's control program for as long as I've been a programmer on the team:
rotatinglight = 1 - comp_mode
Our light has always worked properly - it's been on when the robot was enabled and off when it was disabled. This is the case during matches and also when using the homemade Competition Port dongle. For us, comp_mode has always been equal to ZERO when the robot has been enabled.
http://www.innovationfirst.com/FIRST...nout_Guide.PDF
Here's why I think comp_mode = 0 during a match. I might be completely wrong - it wouldn't be the first time.
According to the official Competition Port pinout, you must connect Ground Pin 8 to Disable Pin 6 in order to DISABLE the robot. This is the same thing you do to turn a digital input on - completing the circuit between ground and the input pin yields a logical 1 inside the program. If the Competition Port inputs follow the same pattern, then the comp_mode input turns ON when you close the circuit (robot disabled) and OFF when you open the circuit (robot enabled). If this is all true, then comp_mode = 0 during a match.