View unanswered posts | View active topics It is currently Sat Oct 01, 2016 4:49 pm

 Page 1 of 1 [ 5 posts ]
 Print view Previous topic | Next topic
Error compiling in 3.08
Author Message
Rookie

Joined: Sun Sep 18, 2011 7:58 pm
Posts: 12
Location: Porto, Portugal
Error compiling in 3.08
I have a program that compiles perfectly in robotc 3.05 but in robotc 3.08 I get the following error whenever the atan2 function is called:
**Error**:Multiple exact overloads for 'atan2' match [including some 'const' parms]
*Warning*:Selected: Converted0:0/20 atan2(float x, float y)
*Warning*:Worse: Converted1:0/20 atan2(float x, float y)
One example of the code is this:
 Code:rBT_DirTgt_grd = (atan2(y_Offset, x_Offset))*200/PI;

The atan2 function is borrowed and is defined at the beginning:
 Code://////////////////////////////////////////////////////////////////////////////////////////////////////// 1 ArcusTangens mit Sonderfaellen; Angabe in radians!//////////////////////////////////////////////////////////////////////////////////////////////////////// x=Ankathete y=Gegenkathete Tangens=y/x - ArcTangent2 function to calculate distance runfloat atan2(float x, float y){  float phi;                                          //phi=radians;  if (x>0) {phi=atan(y/x);}  else    if ((x<0)&&(y>=0))  {phi=PI+atan(y/x);}  else    if ((x<0)&&(y<0))   {phi=-PI+atan(y/x);}  else    if ((x==0)&&(y>0))  {phi=PI/2;}  else    if ((x==0)&&(y<0))  {phi=-PI/2;}  else    if ((x==0)&&(y==0)) {phi=0;}  return phi;}

Any help?
Thanks,

Sun Jun 17, 2012 1:52 pm

Joined: Wed Mar 05, 2008 8:14 am
Posts: 3654
Location: Rotterdam, The Netherlands
Re: Error compiling in 3.08
Hey there,

Would you mind attaching your program so we can check it out?

- Xander

_________________
| Professional Conduit of Reasonableness
| (Title bestowed upon on the 8th day of November, 2013)
| My Blog: I'd Rather Be Building Robots
| ROBOTC 3rd Party Driver Suite: [Project Page]

Sun Jun 17, 2012 2:22 pm
Rookie

Joined: Sun Sep 18, 2011 7:58 pm
Posts: 12
Location: Porto, Portugal
Re: Error compiling in 3.08
Yes, sure!
The file is attached.
Works, fine in 3.05 but not in 3.08.
It's work in progress and messy but I hope it's enough clear to show the problem.
Thank you.

Last edited by rbtx on Tue Jun 19, 2012 6:58 am, edited 1 time in total.

Mon Jun 18, 2012 3:56 pm

Joined: Wed Mar 05, 2008 8:14 am
Posts: 3654
Location: Rotterdam, The Netherlands
Re: Error compiling in 3.08
It's what I suspected The tan2 function in your file conflicts with the one in common.h of my driver suite.

- Xander

_________________
| Professional Conduit of Reasonableness
| (Title bestowed upon on the 8th day of November, 2013)
| My Blog: I'd Rather Be Building Robots
| ROBOTC 3rd Party Driver Suite: [Project Page]

Tue Jun 19, 2012 6:54 am
Rookie

Joined: Sun Sep 18, 2011 7:58 pm
Posts: 12
Location: Porto, Portugal
Re: Error compiling in 3.08
Ok, changed the function name and it run flawless.
Thank you.

Tue Jun 19, 2012 7:05 am
Display posts from previous:  Sort by
 Page 1 of 1 [ 5 posts ]

#### Who is online

Users browsing this forum: No registered users and 1 guest

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

Search for:
 Jump to:  Select a forum ------------------ ROBOTC Applications    ROBOTC for LEGO MINDSTORMS       Third-party sensors    ROBOTC for CORTEX & PIC    ROBOTC for VEX IQ    ROBOTC for Arduino    Robot Virtual Worlds    Multi-Robot Communications    Issues and Bugs Competitions & Partners    Mini Urban Challenge    CS2N Robot Virtual Worlds Competitions       VEX Skyrise Competition 2014-2015       VEX Toss Up 2013-2014       FTC Block Party! 2013-2014    Competitions using VEX - BEST, TSA, VEX, and RoboFest!    FTC Programming    RoboCup Junior and Other ROBOT Competitions Virtual Brick Robotics Discussions    General Discussions    Project Discussions Off-Topic ROBOTC Forum & ROBOTC.net Suggestions/Feedback    ROBOTC Forums Suggestions/Comments    ROBOTC.net Suggestions/Comments       NXT Programming: Tips for Beginning with ROBOTC       VEX Programming: Tips for Beginning with ROBOTC    2013 Robotics Summer Of Learning       VEX Toss Up Programming Challenge       FTC Ring It Up! Programming Challenge    International Forums       Spanish Forums          ROBOTC for MINDSTORMS          ROBOTC for VEX       French Forums          ROBOTC pour Mindstorms          ROBOTC pour IFI VEX       Japanese Forums （日本語のフォーラム）       German Forums    2015 Spring Carnival Event    PLTW (Project Lead The Way)    Robotics Merit Badge    2014 Robotics Academy Summer of Learning