View unanswered posts | View active topics It is currently Tue Jul 22, 2014 7:23 am






Reply to topic  [ 4 posts ] 
FTC_Comp_Include.c doesn't compile 
Author Message
Rookie

Joined: Fri Nov 16, 2012 1:29 am
Posts: 2
Post FTC_Comp_Include.c doesn't compile
So I'm trying to move my code into the template, but the include for the template won't compile.

The first error is on line 3, "duplicate variable declaration of 'joystick'"
The next two are for lines 13 and 14 "undefined variable 'FTCMotor'"

Anyone know what I'm supposed to do? I'm pretty sure I can't change it, because it's the template. Is there an updated one somewhere?


Fri Nov 16, 2012 1:33 am
Profile
Guru
User avatar

Joined: Sun Nov 15, 2009 5:46 am
Posts: 1347
Post Re: FTC_Comp_Include.c doesn't compile
You need to post your code. I don't know what you are talking about.


Fri Nov 16, 2012 1:40 am
Profile
Rookie

Joined: Fri Nov 16, 2012 1:29 am
Posts: 2
Post Re: FTC_Comp_Include.c doesn't compile
It's a sample program.

NXT/First Tech Challenge/FTC_Comp_Template.c

which includes FTC_Comp_Include.c but I don't know where it's located, the compiler opened it for me


Fri Nov 16, 2012 2:20 am
Profile
Guru
User avatar

Joined: Sun Nov 15, 2009 5:46 am
Posts: 1347
Post Re: FTC_Comp_Include.c doesn't compile
I see. It looks like the template is for single program mode. Our team doesn't use that template. We use dual program mode with our own templates. I tried to understand what the FTC_Comp template is trying to do but it seems broken to me. First, it is using FTCMotor. FTCMotor is only defined in BuiltInVariables.txt and nowhere else. It has a note in the comment that this is temporary definition for prototype hardware. Secondly, it only deals with 3 LEGO motors and 2 "FTC motors". A typical FTC competition robot has more than that. Lastly, the joystick global structure is already declared in JoystickDriver.c, and it is declared again in FTC_Comp_Include.c. It's obviously wrong. So I recommend you to use dual program mode (autonomous.c and teleop.c). Or you can send email to support@robotc.net and ask them why FTC_Comp_Template.c is not working.


Fri Nov 16, 2012 9:18 am
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 4 posts ] 

Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  



Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.