Log in

View Full Version : [FTC]: Detecting Alliance Color


alexrcoleman
18-01-2014, 12:37
Hey, this is Team 61 O-Zone. I noticed that the JoystickDriver.c file contained a commented out line // joystickCopy.TeamColor = false; in the section of the code where the default values for the joystick are set. This made me curious if it was in fact possible to detect the TeamColor through the joystick. I also noted that when the tempBuffer values are read and converted into the fields for the joystick, the first one used is joystickCopy.UserMode = tempBuffer[1]; This is interesting because arrays start with element 0, so what does tempBuffer[0] contain? Is it the team color flag? If so, why is it not implemented?
Thanks!

Note: When I say team/alliance color, I'm talking about whether the robot is set up in Samantha to be Red or Blue.

maths222
18-01-2014, 17:24
I asked the robotc devs about this earlier, and they said that "It's no longer used and should be a zero at all times."

alexrcoleman
18-01-2014, 17:27
I asked the robotc devs about this earlier, and they said that "It's no longer used and should be a zero at all times."

Ah, that's a shame, seemed like there could be a lot of potential from it; for one, wouldn't have to make the driver pick which alliance we were ;) I wonder why they removed it though, seems kind of random. Well anyways, thanks for the info!