Encoder class cannot be found in C++ WPI Library

Hey everyone. We are having issues trying to use the encoder class in the WPI Library. It seems all the classes are there except the encoder class. Did any of you guys have the same problem?

Any help would be appreciated. Thanks

The Encoder class is there. If you’re seeing just Eclipse reporting a red squiggly line underneath it, it may be just a bug in Eclipse’s real-time intellisense (several other teams have reported similar behavior). Try actually compiling your code and see if it works.

From what i researched, with the new Phoenix Framework, you don’t declare encoders through the WPIlibrary. Instead you do it through the talon SRX with configSelectedFeedbackSensor()

We are trying to use SRX mag encoders with Talon SRX

Hi everyone,

We just realized this too. It builds but the errors are still there. We haven’t tested if they code will deploy with the errors or not. Plus we aren’t using the talon encoders. Any thoughts?

If it builds, they aren’t really errors, and it’s safe to ignore Eclipse’s reporting. It’s a bug in Eclipse’s real time “intellisense” feature causing Eclipse to report them as errors when they’re really not (e.g. a false positive).