Alright, so storytime: we decompiled the code off of our RoboRIO after the computer we ran since forever died before we could rescue the code. Afterwards, we set up a new computer following the instructions on wpilib to include the wpilibj package and all the necessary imports, however we seem to be missing crucial components in most of the classes, such as:
import edu.wpi.first.wpilibj.CANSpeedController;
import edu.wpi.first.wpilibj.CANSpeedController.ControlMode;
import edu.wpi.first.wpilibj.MotorSafety;
import edu.wpi.first.wpilibj.MotorSafetyHelper;
import edu.wpi.first.wpilibj.PIDOutput;
import edu.wpi.first.wpilibj.PIDSource;
import edu.wpi.first.wpilibj.PIDSourceType;
import edu.wpi.first.wpilibj.Timer;
And more. Any recommendations to find or fix these imports would be wonderful, as we have tried to reinstall the plugins, restart the computer, and reinstall the TalonSRX software. Below is the code on GitHub:
I would try deleting the code and repository from the disk, and then import the code again from Github. I imported the code and I’m not getting any errors. Try creating a new project on the computer to see if it’s just an issue with the project or the computer.
The good news is: your code is fine. I have no problem running your code on my local machine, which leads me to believe it’s something wrong with your imports within your IDE or your install of WPILib.
Are you able to import any WPILib classes?
If not, check your project-specific libraries by right clicking the project in project explorer, and going Build Path>Libraries to verify that WPILib is being correctly imported into your specific project.
If you are able to install some WPILib classes, go ahead and reinstall the WPI libraries. Sometimes the install can become corrupted or go wrong if you have something else running in parallel.
Go ahead and try this. Let me know what you get.