Skip to content

Migrate encoder module to use google test - #638

Merged
patkenneally merged 36 commits into
developfrom
feature/clean-encoder
Oct 1, 2026
Merged

patkenneally merged 36 commits into
developfrom
feature/clean-encoder

Conversation

@patkenneally

Copy link
Copy Markdown
Collaborator

Description

This PR migrates most of the tests to C++ tests. The Python test now only checks that the generated module interface works.

While here, we've added many quality of life improvements and fixed many bugs

  • You now give the number of wheels and the clicks per rotation when you create the encoder.
  • Values that are not valid now cause an error.
  • Signal states use a new type, EncoderSignal (Nominal, Off, Stuck). You can set one wheel or all wheels at once.

Fixes

  • A wheel count that is too large no longer writes past the end of the arrays.
  • Off and stuck states now work on the first step.
  • Wheel angles now pass through on every step.
  • Reset keeps the signal states that you set.
  • Wheels that are no longer in use send zero.
  • A missing input message now stops the simulation with an error.

Verification

The tests are migrated to C++ and a number of property tests are added.

Documentation

The documentation is rewritten.

Future work

None

@patkenneally patkenneally self-assigned this Sep 28, 2026
@patkenneally patkenneally linked an issue Sep 28, 2026 that may be closed by this pull request
@patkenneally
patkenneally force-pushed the feature/clean-encoder branch 3 times, most recently from e9394d0 to 69995e5 Compare September 28, 2026 23:11
Comment thread src/simulation/deviceInterface/encoder/encoder.cpp
@patkenneally
patkenneally merged commit 8faac39 into develop Oct 1, 2026
5 checks passed
@patkenneally
patkenneally deleted the feature/clean-encoder branch October 1, 2026 17:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

MIgrate encoder module to google test

2 participants