Go to Post Viva la geek! - Andy Baker [more]
Home
Go Back   Chief Delphi > Technical > Programming > C/C++
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
 
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 06-11-2011, 21:34
calcmogul's Avatar
calcmogul calcmogul is offline
WPILib Developer
AKA: Tyler Veness
FRC #3512 (Spartatroniks)
Team Role: Mentor
 
Join Date: Nov 2011
Rookie Year: 2012
Location: Santa Maria, CA
Posts: 52
calcmogul is just really nicecalcmogul is just really nicecalcmogul is just really nicecalcmogul is just really nice
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.
Reply With Quote
  #2   Spotlight this post!  
Unread 06-11-2011, 23:45
Joe Ross's Avatar Unsung FIRST Hero
Joe Ross Joe Ross is offline
Registered User
FRC #0330 (Beachbots)
Team Role: Engineer
 
Join Date: Jun 2001
Rookie Year: 1997
Location: Los Angeles, CA
Posts: 8,561
Joe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond repute
Re: C++ SetCompetitionMode() Error

The WPILib.pdf that you seem to be referencing is for EasyC for Vex/IFI FRC controllers.
Reply With Quote
  #3   Spotlight this post!  
Unread 07-11-2011, 00:51
calcmogul's Avatar
calcmogul calcmogul is offline
WPILib Developer
AKA: Tyler Veness
FRC #3512 (Spartatroniks)
Team Role: Mentor
 
Join Date: Nov 2011
Rookie Year: 2012
Location: Santa Maria, CA
Posts: 52
calcmogul is just really nicecalcmogul is just really nicecalcmogul is just really nicecalcmogul is just really nice
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.
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 12:58.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi