ROBOTC.net forums
http://robotc.net/forums/

FTC_Comp_Include.c doesn't compile
http://robotc.net/forums/viewtopic.php?f=52&t=5114
Page 1 of 1

Author:  Tapeman [ Fri Nov 16, 2012 1:33 am ]
Post subject:  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?

Author:  MHTS [ Fri Nov 16, 2012 1:40 am ]
Post subject:  Re: FTC_Comp_Include.c doesn't compile

You need to post your code. I don't know what you are talking about.

Author:  Tapeman [ Fri Nov 16, 2012 2:20 am ]
Post subject:  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

Author:  MHTS [ Fri Nov 16, 2012 9:18 am ]
Post subject:  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.

Page 1 of 1 All times are UTC - 5 hours [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/