Log in

View Full Version : Errors in motor declarations


E Dawg
05-01-2015, 11:23
We are getting errors in all of our motor constructors. It reads: "The type 'Talon' must implement the pure virtual method 'SpeedController::Set'." Essentially, we are being told that Set is not being overridden, yet it is overridden. Has anyone else run into this and solved it? Or does anyone have a solution?

Our constructor looks like this:
motor1 = new Talon(0);

Thanks.

Cel Skeggs
05-01-2015, 11:55
If it isn't too big, can you post your entire file? It could help diagnose the problem.
If it is too big to post, could you try creating a new minimal project, make sure that it exhibits this problem, and post the entire code of that?

Joe Ross
05-01-2015, 12:00
Is the error being reported by the Eclipse C++ syntax checker, or when you are building the program? If it is the former, try to rebuild the index per https://wpilib.screenstepslive.com/s/4485/m/13810/l/145319-creating-your-benchtop-test-program#RebuildingTheIndex

E Dawg
05-01-2015, 13:18
Fixed it! We uninstalled and reinstalled everything. There must have been a problem with the program finding the WPI libraries.

ejb1123
05-01-2015, 13:19
It need a type to make the varuble. I have c++ experience with QT but this is my first year in FRC and I haven't worked with the WPI 2015 C++ library yet. I am not sure if they have to be defined as a pointer. Below is how I would define it.
Talon *motor1 = new Talon(0);