![]() |
Re: detecting your own alliance(C++)
If only just to take rad pictures.
|
Re: detecting your own alliance(C++)
Quote:
If you examine WPILib, the START_ROBOT_CLASS macro passes startRobotTask() a function that creates an object of your RobotBase derived class. Once it starts the robot task, it creates your object. This is only done once (or at least, only when FRC_UserProgram_StartupLibraryInit() is called). Strictly speaking, FRC_UserProgram_StartupLibraryInit (also defined in the START_ROBOT_CLASS macro) is more like Initialize() or IO_Initialization()... but of course it gets called before your task is created and its probably not a particularly great idea to use it. :) |
Re: detecting your own alliance(C++)
Inside the WPI library, look in the driverstation.cpp file.
Inside there, you'll find that there is a function to tell you what alliance you are on (also, there is one that will tell you what station you're plugged into, 1,2, or 3) Quote:
|
| All times are GMT -5. The time now is 13:41. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi