View Full Version : Code Declaration Window - Check Team in Code
I normally use Microsoft Visual Studio outside of robotics, and constantly use the "Code Declaration Window" and I love it. I was wondering if anyone knew of something similar in WindRiver (or Eclipse...)
I found something similar on the internet, but it didn't tell me how to activate it. It just told me it was there and showed a pretty screenshot...
Also, does anyone know how to check the team color in C++? I saw sombody post it earlier, but I can't seem to find it again for the life of me, and I've tried looking through the WPILib docs too... (Including regenerated ones I generated)
~DtD
EHaskins
18-01-2009, 17:43
There is a "GetAlliance" function on DriverStation, which returns an Alliance enum. I can't find it in the docs, but it is in the source for V1.2.1562. Its in DriverStation.cpp line 316, and DriverStation.h lines 23 and 46.
Gamer930
19-01-2009, 20:51
Is there the same/similar block in Labview to get what team you are on (Blue or Red) ??
I know I could just add a switch to the robot that is switched before each match but trying to take the Team Error out. . . I remember reading about it, but can't find it now.
gvarndell
20-01-2009, 07:09
I normally use Microsoft Visual Studio outside of robotics, and constantly use the "Code Declaration Window" and I love it. I was wondering if anyone knew of something similar in WindRiver (or Eclipse...)
I found something similar on the internet, but it didn't tell me how to activate it. It just told me it was there and showed a pretty screenshot...
I don't know what this code declaration window does but Workbench has many powerful code navigation/comprehension features -- type hierarchy display, quick find declarations, etc.
Eclipse is big on context menus.
To learn what can be done, it's often surprisingly educational to highlight some identifier and then right-click to see the context menu.
WRT to whatever you found on the internet -- if you post a link, maybe someone can help you figure out how to plug it in to Workbench.
vBulletin® v3.6.4, Copyright ©2000-2017, Jelsoft Enterprises Ltd.