![]() |
Team Color Identification
Hello all,
As far as I understand, we should receive an indicator of what team we're on from the competition port on the Driver's Station. Does anyone know how to access this in our programming code or if this is even possible? (we're using c++) Thanks, Sarah Edit: I found it, but I will leave this posted as a refference for other teams. The Driver Station class contains an enumerated variable called "Alliance" with the values kRed, kBlue, and kInvalid. |
Re: Team Color Identification
You can get your team color by using the DriverStation class:
Code:
DriverStation ds; |
Re: Team Color Identification
Anyone know a way to trick the robot into thinking it is on red or blue for testing purposes?
~DtD |
Re: Team Color Identification
I wouldn't play with the competition port at all, I would just say use a switch, and see if receiving it from the DS actually works at competition ;)
|
Re: Team Color Identification
if you know about classes, create a simple class
(this probably has bugs in it, but illustrates the point) Code:
class FakeDriverStation :private DriverStation |
| All times are GMT -5. The time now is 02:39. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi