![]() |
Missing CANTalon class
Obligatory "I'm not very experienced with Java nor programming robots in FRC," so feel free to be as critical as you want, everything is a learning process after all.
We've recently decided to use CAN on our robot to connect our Talon SRX controllers, only problem is that the original code we had done used the Talon class to initialize the speed controllers to build our RobotDrive. No big deal though, we just have to change Talon to CANTalon and remove the port numbers from the constructor since CAN doesn't use PWM and -- oh dear why is there so much red on my screen now? So the errors came from our program not having CANTalon imported into it, but when I try to import it using the following path, it says it does not exist: import edu.wpi.first.wpilibj.CANTalon; We're really not sure how to resolve this issue, all our other classes have imported just fine, but this one just doesn't seem to exist. There isn't much documentation saying I'd have to install some other plugins or update to a certain version for it to be available, so what am I doing wrong? Thanks in advance to anyone reading. tl;dr edu.wpi.first.wpilibj.CANTalon isn't being imported because it's missing, how can I make that not happen? |
Re: Missing CANTalon class
As always, it really helps if we can see your full code. There could be confounding variables everywhere, and we can't see all the ways things can change. Can you perhaps upload it to GitHub?
Also, make sure you are using CANTalon, not CANTalonSRX, as that class was removed in 2016. |
Re: Missing CANTalon class
Side note: Are your CANTalon constructors empty? If you removed the ports and didn't replace it with their integer CAN IDs then that would cause a compile-time error on its own.
|
Re: Missing CANTalon class
Quote:
https://github.com/carson-fitzgibbon/Robotics-Test As for the CANTalon vs CANTalonSRX thing, we are trying to use CANTalon. Quote:
|
Re: Missing CANTalon class
Quote:
|
Re: Missing CANTalon class
Unfortunately I'm not in a position to test it right now, but try removing
Code:
import edu.wpi.first.wpilibj.*; |
Re: Missing CANTalon class
Quote:
|
Re: Missing CANTalon class
Quote:
|
Re: Missing CANTalon class
Quote:
Also try it with eclipse. From my understanding NetBeans works only with older versions of WPILIB and the CRIO. The version of WPILIB that netbeans uses I don't believe to have been updated. |
Re: Missing CANTalon class
Quote:
|
Re: Missing CANTalon class
Quote:
|
Re: Missing CANTalon class
Quote:
I recreated our project in Eclipse and copied the code over and now the error marking works, but more importantly: CANTalon works! Thank you all for the help. |
| All times are GMT -5. The time now is 08:21 AM. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi