Undefined??? depreciated???

Hey Guys! we are having issue after installing all the new CTR files, every thing comes up undefined or depreciated! we’ve tried and modified everything, made left and right sides grouped, tried a lot of things. thanks for your time!!


public class Robot extends IterativeRobot {
	
	public static Joystick Left;
	public static Joystick Right;
	
	public TalonSRX FR = new CANTalon(0);	
	public TalonSRX FL = new CANTalon(1);
	public TalonSRX RR = new CANTalon(2);
	public TalonSRX RL = new CANTalon(3);
	
	public  DifferentialDrive Drive = new DifferentialDrive(FR,FL,RR,RL);

CANTalon has been deprecated, TalonSRX is now the correct class to use.

You can find more details about these changes and links to documentation and how to use the classes here:
https://wpilib.screenstepslive.com/s/currentCS/m/getting_started/l/801080-new-for-2018

When you declare something as a TalonSRX object (on the left side) then you also need to instantiate it as a TalonSRX object (on the right side).

Example (Java):

TalonSRX myTalon = new TalonSRX(0);

If you do this and it still isn’t working, make sure you follow the CTRE documentation on how to install the libraries. If you’re using Windows, the installer should set it up for you, but if you’re using a Unix-based system, you need to read the README that comes with the download.

right yea uh forgot to revert that back to that before sending it in our question. it wont connect the dots.

What do you mean by “wont connect the dots”? If you are referring to the fact that numerous methods that CANTalon supported now don’t exist or have been renamed for TalonSRX, that is to be expected. I recommend reading the migration guide available on CTRE’s website and preparing to spend a few hours porting everything.

Try using WPI_TalonSRX instead of CANTalon();

You can check out the rest of the migration guide [here](https://github.com/CrossTheRoadElec/Phoenix-Documentation/blob/master/Migration Guide.md).

Make sure you read that in full before asking any questions here!

Keep in mind that 2018 WPILib assumes that you’ve imaged the target RoboRIO with the 2018 image. If the years mis-match, your code will compile locally but you would see runtime errors about missing classes or methods.

If you’re using eclipse, it will check the roboRIO version and not deploy if the image version is mismatched.