Go to Post What makes a man is not the mistakes, but the actions that follow. Andy B. - 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 02-03-2015, 11:26 AM
King Nerd III's Avatar
King Nerd III King Nerd III is offline
Chief Programmer/Head of Autonomous
AKA: Isaac
FRC #1410 (The Kraken)
Team Role: Programmer
 
Join Date: Jan 2014
Rookie Year: 2014
Location: Denver, CO
Posts: 113
King Nerd III is an unknown quantity at this point
Eclipse is being a butt

Hello, it is I, Lord Supreme Programmer with Team 1410, and I am trying to write the code for the bot this year, but alas, I keep getting these errors while using CANTalon:

The type 'CANTalon' must implement the inherited pure virtual method 'CANSpeedController::ConfigPotentiometerTurns'

and so on. It says this for every CANTalon I write, and nothing seems to go away. The file still works and builds, but these errors are annoying. Does anyone know how to fix this?
Reply With Quote
  #2   Spotlight this post!  
Unread 02-03-2015, 02:49 PM
ozrien's Avatar
ozrien ozrien is offline
Omar Zrien
AKA: Omar
no team
Team Role: Mentor
 
Join Date: Sep 2006
Rookie Year: 2003
Location: Sterling Heights, MI
Posts: 516
ozrien has a brilliant futureozrien has a brilliant futureozrien has a brilliant futureozrien has a brilliant futureozrien has a brilliant futureozrien has a brilliant futureozrien has a brilliant futureozrien has a brilliant futureozrien has a brilliant futureozrien has a brilliant futureozrien has a brilliant future
Re: Eclipse is being a butt

Lord Supreme Programmer, try to rebuild in the index.
http://wpilib.screenstepslive.com/s/...p-test-program
Reply With Quote
  #3   Spotlight this post!  
Unread 02-03-2015, 02:54 PM
King Nerd III's Avatar
King Nerd III King Nerd III is offline
Chief Programmer/Head of Autonomous
AKA: Isaac
FRC #1410 (The Kraken)
Team Role: Programmer
 
Join Date: Jan 2014
Rookie Year: 2014
Location: Denver, CO
Posts: 113
King Nerd III is an unknown quantity at this point
Re: Eclipse is being a butt

Quote:
Originally Posted by ozrien View Post
Lord Supreme Programmer, try to rebuild in the index.
http://wpilib.screenstepslive.com/s/...p-test-program
I have done that many, many times. It doesn't go away! Here is a list of what I have tried:
Rebuild project
clean and rebuild
rebuild index
un/reinstall libraries
un/reinstall toolchain
un/reinstall eclipse
rewritten entire project
restarted computer xMany times
I just can't fix it. My mentor had the same problem, but after a minute it disappeared
Reply With Quote
  #4   Spotlight this post!  
Unread 02-03-2015, 02:55 PM
King Nerd III's Avatar
King Nerd III King Nerd III is offline
Chief Programmer/Head of Autonomous
AKA: Isaac
FRC #1410 (The Kraken)
Team Role: Programmer
 
Join Date: Jan 2014
Rookie Year: 2014
Location: Denver, CO
Posts: 113
King Nerd III is an unknown quantity at this point
Re: Eclipse is being a butt

Quote:
Originally Posted by King Nerd III View Post
I have done that many, many times. It doesn't go away! Here is a list of what I have tried:
Rebuild project
clean and rebuild
rebuild index
un/reinstall libraries
un/reinstall toolchain
un/reinstall eclipse
rewritten entire project
restarted computer xMany times
I just can't fix it. My mentor had the same problem, but after a minute it disappeared
Its just CANTalons and Victors. Talons work, which made me think its not the index.

Last edited by King Nerd III : 02-03-2015 at 03:08 PM.
Reply With Quote
  #5   Spotlight this post!  
Unread 02-03-2015, 03:36 PM
ozrien's Avatar
ozrien ozrien is offline
Omar Zrien
AKA: Omar
no team
Team Role: Mentor
 
Join Date: Sep 2006
Rookie Year: 2003
Location: Sterling Heights, MI
Posts: 516
ozrien has a brilliant futureozrien has a brilliant futureozrien has a brilliant futureozrien has a brilliant futureozrien has a brilliant futureozrien has a brilliant futureozrien has a brilliant futureozrien has a brilliant futureozrien has a brilliant futureozrien has a brilliant futureozrien has a brilliant future
Re: Eclipse is being a butt

That's a bummer usually re-indexing fixes it, but I still think it's syntax parser related only because you said the project still builds, and I know for a fact ConfigPotentiometerTurns is implemented (it's an empty implementation).

Just to sanity check (I'm sure you did this too) but maybe it might help another team having similar symptoms....

-navigate to the Problems tab and manually delete all the errors and warnings. You can highlight the treenodes in there and press delete or right-click-menu-delete. Eclipse will warn about deleting the error being permanent, hit ok.

Then in the project explorer, under binaries delete your FRCUserProgram. This step is necessary just for checking that the project does build.

Close all other open projects in eclipse except for the one you care about.

Clean the project. (takes a min, while you wait the build menu item will be gray)

Full build (or CNTRL+B), and let it finish.

Confirm FRCUserProgram is back (because it built ok).
Confirm if you still get the parser errors.
Reply With Quote
  #6   Spotlight this post!  
Unread 02-03-2015, 03:45 PM
King Nerd III's Avatar
King Nerd III King Nerd III is offline
Chief Programmer/Head of Autonomous
AKA: Isaac
FRC #1410 (The Kraken)
Team Role: Programmer
 
Join Date: Jan 2014
Rookie Year: 2014
Location: Denver, CO
Posts: 113
King Nerd III is an unknown quantity at this point
Re: Eclipse is being a butt

Quote:
Originally Posted by ozrien View Post
That's a bummer usually re-indexing fixes it, but I still think it's syntax parser related only because you said the project still builds, and I know for a fact ConfigPotentiometerTurns is implemented (it's an empty implementation).

Just to sanity check (I'm sure you did this too) but maybe it might help another team having similar symptoms....

-navigate to the Problems tab and manually delete all the errors and warnings. You can highlight the treenodes in there and press delete or right-click-menu-delete. Eclipse will warn about deleting the error being permanent, hit ok.

Then in the project explorer, under binaries delete your FRCUserProgram. This step is necessary just for checking that the project does build.

Close all other open projects in eclipse except for the one you care about.

Clean the project. (takes a min, while you wait the build menu item will be gray)

Full build (or CNTRL+B), and let it finish.

Confirm FRCUserProgram is back (because it built ok).
Confirm if you still get the parser errors.
It got rid of those errors! but now a new one is there. It says expected unqualified-id before ')' in the CANTalon... Here's the line its referencing:
fl_motor = new CANTalon(1);
I think eclipse is just trying to make me go crazy.

Last edited by King Nerd III : 02-03-2015 at 03:50 PM.
Reply With Quote
  #7   Spotlight this post!  
Unread 02-03-2015, 04:20 PM
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,112
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: Eclipse is being a butt

Quote:
Originally Posted by King Nerd III View Post
It got rid of those errors! but now a new one is there. It says expected unqualified-id before ')' in the CANTalon... Here's the line its referencing:
fl_motor = new CANTalon(1);
Where is that line? What lines are surrounding it? Context is important. Compiler errors often show up on a line after the actual problem, as the parser tries and eventually fails to make sense of a minor typographic or syntactic error.

(I'm wondering what happened to the front_left_drive constant that used to be where the 1 is now, but that's not really important right now.)

Quote:
I think eclipse is just trying to make me go crazy.
I think rather that it's encouraging you to take things slowly and methodically, reading the documentation and following the directions carefully without skipping any steps. You are not yet experienced enough to recognize what certain results mean, and that's apparently leading you to try things without understanding why.
Reply With Quote
  #8   Spotlight this post!  
Unread 02-03-2015, 04:25 PM
King Nerd III's Avatar
King Nerd III King Nerd III is offline
Chief Programmer/Head of Autonomous
AKA: Isaac
FRC #1410 (The Kraken)
Team Role: Programmer
 
Join Date: Jan 2014
Rookie Year: 2014
Location: Denver, CO
Posts: 113
King Nerd III is an unknown quantity at this point
Re: Eclipse is being a butt

Quote:
Originally Posted by Alan Anderson View Post
Where is that line? What lines are surrounding it? Context is important. Compiler errors often show up on a line after the actual problem, as the parser tries and eventually fails to make sense of a minor typographic or syntactic error.

(I'm wondering what happened to the front_left_drive constant that used to be where the 1 is now, but that's not really important right now.)



I think rather that it's encouraging you to take things slowly and methodically, reading the documentation and following the directions carefully without skipping any steps. You are not yet experienced enough to recognize what certain results mean, and that's apparently leading you to try things without understanding why.
I switched out the constant for an just a basic int typed into it to see if that made it go away, but it didn't.
I have that line in the subsystem DriveBase. Chief Delphi won't let me upload the file again, as I already have it here: http://www.chiefdelphi.com/forums/sh...6&postcount=15
but its the same file.

Last edited by King Nerd III : 02-03-2015 at 04:28 PM.
Reply With Quote
  #9   Spotlight this post!  
Unread 02-03-2015, 04:44 PM
ozrien's Avatar
ozrien ozrien is offline
Omar Zrien
AKA: Omar
no team
Team Role: Mentor
 
Join Date: Sep 2006
Rookie Year: 2003
Location: Sterling Heights, MI
Posts: 516
ozrien has a brilliant futureozrien has a brilliant futureozrien has a brilliant futureozrien has a brilliant futureozrien has a brilliant futureozrien has a brilliant futureozrien has a brilliant futureozrien has a brilliant futureozrien has a brilliant futureozrien has a brilliant futureozrien has a brilliant future
Re: Eclipse is being a butt

Yeah so one thing that's unique about eclipse is the error/warnings sometimes tend to stick around even after you resolve and rebuild. I'm guessing that was the first problem.

That new error sounds like a genuine compiler error, so that means the linker isn't able to create FRCUserProgram. Probably should confirm that though. That also means that you haven't actually been successfully building this whole time, which is good to know.

That line with the Talon c'tor error probably has been a problem this whole time and now it's revealing itself. Maybe make a simple project first and merge in your stuff in pieces until the error shows up to see what the cause is.

Alan's right, the problem is likely before that line, could be in one of the headers too.
Reply With Quote
  #10   Spotlight this post!  
Unread 02-03-2015, 04:51 PM
King Nerd III's Avatar
King Nerd III King Nerd III is offline
Chief Programmer/Head of Autonomous
AKA: Isaac
FRC #1410 (The Kraken)
Team Role: Programmer
 
Join Date: Jan 2014
Rookie Year: 2014
Location: Denver, CO
Posts: 113
King Nerd III is an unknown quantity at this point
Re: Eclipse is being a butt

Quote:
Originally Posted by ozrien View Post
Yeah so one thing that's unique about eclipse is the error/warnings sometimes tend to stick around even after you resolve and rebuild. I'm guessing that was the first problem.

That new error sounds like a genuine compiler error, so that means the linker isn't able to create FRCUserProgram. Probably should confirm that though. That also means that you haven't actually been successfully building this whole time, which is good to know.

That line with the Talon c'tor error probably has been a problem this whole time and now it's revealing itself. Maybe make a simple project first and merge in your stuff in pieces until the error shows up to see what the cause is.

Alan's right, the problem is likely before that line, could be in one of the headers too.
Well I rewrote the line and the error went away for a few builds, but now its back, only this time it says the error is in CANTalon.h... the only problem with that is when I open up CANTalon.h there are no errors.
Reply With Quote
  #11   Spotlight this post!  
Unread 02-03-2015, 04:54 PM
King Nerd III's Avatar
King Nerd III King Nerd III is offline
Chief Programmer/Head of Autonomous
AKA: Isaac
FRC #1410 (The Kraken)
Team Role: Programmer
 
Join Date: Jan 2014
Rookie Year: 2014
Location: Denver, CO
Posts: 113
King Nerd III is an unknown quantity at this point
Re: Eclipse is being a butt

Quote:
Originally Posted by King Nerd III View Post
Well I rewrote the line and the error went away for a few builds, but now its back, only this time it says the error is in CANTalon.h... the only problem with that is when I open up CANTalon.h there are no errors.
Update: I found the error. See attached image, anyone have a clue what the method is supposed to be named??
Attached Thumbnails
Click image for larger version

Name:	Error_Line_88.PNG
Views:	66
Size:	32.7 KB
ID:	18128  
Reply With Quote
  #12   Spotlight this post!  
Unread 02-03-2015, 05:11 PM
ozrien's Avatar
ozrien ozrien is offline
Omar Zrien
AKA: Omar
no team
Team Role: Mentor
 
Join Date: Sep 2006
Rookie Year: 2003
Location: Sterling Heights, MI
Posts: 516
ozrien has a brilliant futureozrien has a brilliant futureozrien has a brilliant futureozrien has a brilliant futureozrien has a brilliant futureozrien has a brilliant futureozrien has a brilliant futureozrien has a brilliant futureozrien has a brilliant futureozrien has a brilliant futureozrien has a brilliant future
Re: Eclipse is being a butt

int GetNumberOfQuadIdxRises();
void SetNumberOfQuadIdxRises(int rises);
virtual bool GetForwardLimitOK() override;
virtual bool GetReverseLimitOK() override;
virtual uint16_t GetFaults() override;
uint16_t GetStickyFaults();
void ClearStickyFaults();

...maybe you bumped spacebar or something while navigating/viewing the headers?
Reply With Quote
  #13   Spotlight this post!  
Unread 02-03-2015, 05:20 PM
King Nerd III's Avatar
King Nerd III King Nerd III is offline
Chief Programmer/Head of Autonomous
AKA: Isaac
FRC #1410 (The Kraken)
Team Role: Programmer
 
Join Date: Jan 2014
Rookie Year: 2014
Location: Denver, CO
Posts: 113
King Nerd III is an unknown quantity at this point
Re: Eclipse is being a butt

Quote:
Originally Posted by ozrien View Post
int GetNumberOfQuadIdxRises();
void SetNumberOfQuadIdxRises(int rises);
virtual bool GetForwardLimitOK() override;
virtual bool GetReverseLimitOK() override;
virtual uint16_t GetFaults() override;
uint16_t GetStickyFaults();
void ClearStickyFaults();

...maybe you bumped spacebar or something while navigating/viewing the headers?
This was the first time I had opened the header. I have no clue where it could have gone. Having that method name missing does explain a lot, though!
I just added it in and the program finally built without any errors, thanks for all the help. I will go and make sure that all my under-programmers fix that error, too, as they all copied their installation of Eclipse from me. Maybe finally all of our code will build perfectly.
I still stand by Eclipse isn't the best, and I still hold out hope that Microsoft will swoop in and save the day by helping to make Visual Studio available as a dev tool for FRC, but now that everything is working I'm content with Eclipse for now.

Last edited by King Nerd III : 02-03-2015 at 05:23 PM.
Reply With Quote
  #14   Spotlight this post!  
Unread 02-03-2015, 10:06 PM
JohnSmooth42 JohnSmooth42 is offline
Is writing code
FRC #0375 (The Robotic Plague)
Team Role: Programmer
 
Join Date: Jan 2015
Rookie Year: 2012
Location: New York
Posts: 27
JohnSmooth42 is an unknown quantity at this point
Re: Eclipse is being a butt

Quote:
Originally Posted by King Nerd III View Post
I still stand by Eclipse isn't the best, and I still hold out hope that Microsoft will swoop in and save the day by helping to make Visual Studio available as a dev tool for FRC, but now that everything is working I'm content with Eclipse for now.
I don't understand why people say Eclipse is so bad, windriver was literally Eclipse with stickers. Everyone keeps saying Visual Studio is so great, which I don't understand either. I think I'll just stick with emacs and gcc
Reply With Quote
  #15   Spotlight this post!  
Unread 02-03-2015, 10:23 PM
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,112
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: Eclipse is being a butt

Quote:
Originally Posted by King Nerd III View Post
...they all copied their installation of Eclipse from me.
Do you mean they didn't actually "install" it on their computers, but just copied files from yours? I wouldn't be very confident in that working. You should always follow the directions in http://wpilib.screenstepslive.com/s/...eclipse-c-java when setting up a computer for C++ robot programming.
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 10:06 AM.

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