Author |
Message |
alexrcoleman
Rookie
Joined: Sat Jan 18, 2014 1:18 pm Posts: 5
|
 Detecting Alliance Color
I noticed that the JoystickDriver.c file contained a commented out line 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 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.
|
Sat Jan 18, 2014 1:26 pm |
|
 |
MHTS
Guru
Joined: Sun Nov 15, 2009 5:46 am Posts: 1523
|
 Re: Detecting Alliance Color
As you can see below, the TJoystick structure does not have the TeamColor field and the initialization line was commented out. So it is safe to say it is something not yet implemented. Regarding the tempBuffer[0] byte, I am not the RobotC folks so I don't know exactly what it is but my experience tells me that it is either the length of the transmitted packet or the version number so that RobotC can tell if the laptop is transmitting the correct version of the structure.
|
Sat Jan 18, 2014 4:54 pm |
|
 |
alexrcoleman
Rookie
Joined: Sat Jan 18, 2014 1:18 pm Posts: 5
|
 Re: Detecting Alliance Color
I did notice that it wasn't in the Joystick structure, but it seems odd for them to make the line Why waste time even typing that line out if it wasn't implemented? Seems kind of odd to me. I don't know. But yeah, I suppose I'll just do some testing with the tempBuffer[0] flag at our next meeting and see if I can figure out what exactly it signifies
|
Sat Jan 18, 2014 5:02 pm |
|
 |
MHTS
Guru
Joined: Sun Nov 15, 2009 5:46 am Posts: 1523
|
 Re: Detecting Alliance Color
It sounds like they are going to support it but it's not there yet.
|
Sat Jan 18, 2014 10:07 pm |
|
 |
alexrcoleman
Rookie
Joined: Sat Jan 18, 2014 1:18 pm Posts: 5
|
 Re: Detecting Alliance Color
Oh I hope so, any idea how long that lines been there? If it's been there a while I doubt it'll ever make it in, but maybe it's new and almost done, lol
|
Sat Jan 18, 2014 11:24 pm |
|
 |
MHTS
Guru
Joined: Sun Nov 15, 2009 5:46 am Posts: 1523
|
 Re: Detecting Alliance Color
I have no idea but I think this is not a difficult thing to implement. It just needs the team info from the FCS. I am expecting this to be part of 4.0.
|
Sun Jan 19, 2014 12:05 am |
|
 |
alexrcoleman
Rookie
Joined: Sat Jan 18, 2014 1:18 pm Posts: 5
|
 Re: Detecting Alliance Color
Yeah, I was thinking it wouldn't be too tough to implement, which made me wonder why it was sortve setup in robotc but commented out, lol. And yeah, hopefully, any idea how long til 4.0 is out?
|
Sun Jan 19, 2014 12:08 am |
|
 |
MHTS
Guru
Joined: Sun Nov 15, 2009 5:46 am Posts: 1523
|
 Re: Detecting Alliance Color
According to the RobotC folks, the beta should be coming out real soon, probably next month or so.
|
Sun Jan 19, 2014 12:18 am |
|
 |
alexrcoleman
Rookie
Joined: Sat Jan 18, 2014 1:18 pm Posts: 5
|
 Re: Detecting Alliance Color
Sweet, I'll keep my eye out for that, thanks 
|
Sun Jan 19, 2014 12:58 am |
|
|