Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   C/C++ (http://www.chiefdelphi.com/forums/forumdisplay.php?f=183)
-   -   Muliple errors from getting started and past years code (http://www.chiefdelphi.com/forums/showthread.php?t=153255)

rakosi2 08-01-2017 20:47

Muliple errors from getting started and past years code
 
1 Attachment(s)
I updated my team's laptop and eclipse is erroring. I uninstalled everything and removed eclipse and installed the newest neon eclipse following the wpi instructions.

RufflesRidge 08-01-2017 21:26

Re: Muliple errors from getting started and past years code
 
Have you tried rebuilding the index? ("Rebuilding the Index" on the page linked below)
https://wpilib.screenstepslive.com/s...p-test-program

If you've already tried that, try closing Eclipse, navigating to your user home directory C:\Users\USERNAME on Windows and locate and delete the wpilib folder, then re-open Eclipse.

rakosi2 09-01-2017 18:55

Re: Muliple errors from getting started and past years code
 
1 Attachment(s)
So after deleting the wpilib folder those errors disappeared but now new errors appeared. This is the code from last year and we are using Talon SRX.

Joe Ross 09-01-2017 19:37

Re: Muliple errors from getting started and past years code
 
Did you install the TalonSRX library?

rakosi2 09-01-2017 19:39

Re: Muliple errors from getting started and past years code
 
I installed the CTRE Toolsuite v4.4.1.8.exe

rakosi2 11-01-2017 00:31

Re: Muliple errors from getting started and past years code
 
Since RufflesRidge asked me to delete the wpilib folder, it also deleted the SRX library. After I reinstalled CTRE Toolkit, it still did not work. What I did was copy the files from /wpilib/user/cpp over to wpilib folder and included #include "CANTalonSRX.h" at the top of the code and it started working. The code for the SmartDashboard is erroring but at least I can move the robot.

jmullins16 11-01-2017 00:40

Re: Muliple errors from getting started and past years code
 
Those drives look like they are CANTalon SRX objects. The key steps to using these that are different this year are:

1) Install the CTRE tools (as you did), AND
2) add: #include <CANTalon.h> in the files so that the methods are defined. They are no longer a subset of wpilib.h as they were last year.

Also, during beta testing we did have an instance where the include paths did not quite get set up correctly for the project. Open the includes in the navigator window on the left and see if there's a path that corresponds to the CTRE files that have been installed. We think that the only time this was not set up correctly for us is when the CTRE tools were installed, but Eclipse was not restarted.

Jeff

rakosi2 13-01-2017 21:13

Re: Muliple errors from getting started and past years code
 
Thanks, I was able to add the SRX library but I cant add the SmartDashboard as SendableChooser is empty.
I added these and still nothing.
#include <SmartDashboard\NamedSendable.h>
#include <SmartDashboard\Sendable.h>
#include <SmartDashboard\SendableChooser.h>
#include <SmartDashboard\SendableChooserBase.h>
#include <SmartDashboard\SmartDashboard.h>

rakosi2 21-01-2017 16:37

Re: Muliple errors from getting started and past years code
 
Ok incase someone else has this error to fix it change
LiveWindow *lw = LiveWindow::GetInstance();
SendableChooser *chooser;
to:
frc::LiveWindow* lw = LiveWindow::GetInstance();
frc::SendableChooser<std::string> chooser;

and:
chooser = new SendableChooser();
chooser->AddDefault(autoNameDefault, (void*) &autoNameDefault);
chooser->AddObject(autoNameCustom, (void*) &autoNameCustom);
frc::SmartDashboard::PutData("Auto Modes", chooser);
to:
chooser.AddDefault(autoNameDefault, autoNameDefault);
chooser.AddObject(autoNameCustom, autoNameCustom);
frc::SmartDashboard::PutData("Auto Modes", &chooser);


All times are GMT -5. The time now is 23:52.

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