allwpilib icon indicating copy to clipboard operation
allwpilib copied to clipboard

Renamed Encoder to QuadratureEncoder

Open Starlight220 opened this issue 4 years ago • 24 comments

Fixes #2185

A version of PR #2416 with both Java and C++ fix.

Moved functionality to QuadratureEncoder class, leaving Encoder a deprecated wrapper class.

Starlight220 avatar Mar 15 '20 11:03 Starlight220

How do I run wpiformat, etc.?

Starlight220 avatar Mar 21 '20 19:03 Starlight220

Follow https://github.com/wpilibsuite/styleguide/blob/master/wpiformat/README.rst to install it. py3 -m wpiformat or python3 -m wpiformat runs it. See wpiformat --help for more.

calcmogul avatar Mar 21 '20 20:03 calcmogul

It would seem that the problem here is C++ compiling. Now working on it, in addition to adjusting examples.

Starlight220 avatar Mar 25 '20 16:03 Starlight220

Looks like examples are failing. e.g. wpilibcExamples/src/main/cpp/examples/GyroDriveCommands/cpp/subsystems/DriveSubsystem.cpp:41:6: error: 'Encoder' in namespace 'frc' does not name a type

PeterJohnson avatar Mar 28 '20 16:03 PeterJohnson

Needs a styleguide fix: wpilibc/src/main/native/include/frc/Encoder.h:118: Add #include <memory> for shared_ptr<> [build/include_what_you_use] [4]

To fix this, add #include <memory> to the includes at the top of Encoder.h

PeterJohnson avatar Apr 01 '20 03:04 PeterJohnson

what's this waiting on?

Starlight220 avatar Apr 12 '20 18:04 Starlight220

Looks like there are conflicts.

AustinShalit avatar Apr 12 '20 19:04 AustinShalit

The conflict is the change itself.

Starlight220 avatar Apr 13 '20 18:04 Starlight220

@Starlight220 Its a conflict in the file. There has to be no conflicts before we can merge. Likely just need to grab changes off of master.

ThadHouse avatar Apr 13 '20 18:04 ThadHouse

Many of the conflicts are method prototypes that I removed as they are inherited. Those method prototypes should be removed, correct?

Starlight220 avatar Apr 13 '20 18:04 Starlight220

The conflict is because commit https://github.com/wpilibsuite/allwpilib/commit/3a5e541b2d895790ea5a9e372d277de0fbf0993e also changed Encoder.h, specifically it added a missing WPI_DEPRECATED call. Git isn't smart enough to figure out if your change should override that change, that change should override your change, or whether they both apply, which is why it marks it as a conflict that you need to resolve.

In this case, you should add that same change to your PR.

sciencewhiz avatar Apr 14 '20 04:04 sciencewhiz

And, windows is failing again for no reason.

Starlight220 avatar Apr 14 '20 10:04 Starlight220

Linux is failing for no reason. Rerun the pipeline?

Starlight220 avatar Apr 21 '20 07:04 Starlight220

It looks like the Linux_Arm job correctly failed - the examples that use frc::Encoder need to be updated.

auscompgeek avatar Apr 21 '20 08:04 auscompgeek

Looks like wpilibcExamples\src\main\cpp\examples\DMA\cpp\Robot.cpp needs updating too.

PeterJohnson avatar May 01 '20 16:05 PeterJohnson

please rerun the pipeline, it lost record of the build and the DMA example was fixed in an earlier commit.

Starlight220 avatar May 06 '20 17:05 Starlight220

/azp run

sciencewhiz avatar May 06 '20 19:05 sciencewhiz

Commenter does not have sufficient privileges for PR 2418 in repo wpilibsuite/allwpilib

azure-pipelines[bot] avatar May 06 '20 19:05 azure-pipelines[bot]

Commenter does not have sufficient privileges for PR 2418 in repo wpilibsuite/allwpilib

azure-pipelines[bot] avatar May 07 '20 07:05 azure-pipelines[bot]

/azp run

PeterJohnson avatar May 15 '20 01:05 PeterJohnson

Azure Pipelines successfully started running 2 pipeline(s).

azure-pipelines[bot] avatar May 15 '20 01:05 azure-pipelines[bot]

DMASample.h/c needs to be changed, will get to it later, might be next week.

Starlight220 avatar May 15 '20 06:05 Starlight220

The Shuffleboard example needs updating, will do later.

Starlight220 avatar May 27 '20 17:05 Starlight220

We still want this PR, but it needs rebasing.

calcmogul avatar Jul 11 '21 07:07 calcmogul

Lots of merge conflicts, and abandoned by contributor.

calcmogul avatar Nov 22 '23 19:11 calcmogul