![]() |
C++ SetCompetitionMode() Error
I'm one of the programmers on FRC Team 3512 for the upcoming 2012 competition.
My team's been writing the code for a mock competition and rewriting our old robot's code in C++, but we've been having trouble with one function in particular. According to the documentation for WPILib, a function called 'SetCompetitionMode()' is required to run the code at a competition. Page 15 of the WPILib.pdf manual states that if the function isn't there, the field automatically provides one and passes it a value of 0. However, it needs to be passed 1 in order to work as competition code. Including 'API.h', the header file that function is in, causes an unresolved inclusion compilation error. This header file isn't included anywhere on all three of our WindRiver installations. I've applied the latest WPILib C++ source patch from http://firstforge.wpi.edu/sf/frs/do/...cts.wpilib/frs, the one from the 2011 off-season, but the problem still exists. Any suggestions or possible solutions are appreciated. |
Re: C++ SetCompetitionMode() Error
The WPILib.pdf that you seem to be referencing is for EasyC for Vex/IFI FRC controllers.
|
Re: C++ SetCompetitionMode() Error
Oh. I didn't notice the function was exclusively for easyC; that makes sense. The SimpleRobot sample project in WindRiver is supposed to include everything we need, and since SetCompetitionMode() wasn't in that sample, it isn't necessary.
Thank you very much for noticing that. |
| All times are GMT -5. The time now is 12:58. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi