|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Muliple errors from getting started and past years code
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.
|
|
#2
|
|||
|
|||
|
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. |
|
#3
|
|||
|
|||
|
Re: Muliple errors from getting started and past years code
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.
|
|
#4
|
||||||
|
||||||
|
Re: Muliple errors from getting started and past years code
Did you install the TalonSRX library?
|
|
#5
|
|||
|
|||
|
Re: Muliple errors from getting started and past years code
I installed the CTRE Toolsuite v4.4.1.8.exe
|
|
#6
|
|||
|
|||
|
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.
|
|
#7
|
||||
|
||||
|
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 |
|
#8
|
|||
|
|||
|
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> |
|
#9
|
|||
|
|||
|
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); Last edited by rakosi2 : 21-01-2017 at 16:41. |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|