Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add IO states to state representation (cpp) #158

Merged
merged 9 commits into from
Mar 26, 2024
Merged

Conversation

domire8
Copy link
Member

@domire8 domire8 commented Mar 1, 2024

Description

This turns out to be quite the PR, but its honestly a lot of boilderplate code and docstrings. The implementation of the classes follow our common patterns and don't add much complexity or new features. Same for the tests, it's the same lines as in the other state classes, to test all setters and getters.

Protocol and pybindings come in follow up PRs

Review guidelines

Estimated Time of Review: 15 minutes

Checklist before merging:

  • Confirm that the relevant changelog(s) are up-to-date in case of any user-facing changes

@domire8 domire8 requested review from bpapaspyros and eeberhard March 1, 2024 14:46
Copy link
Member

@eeberhard eeberhard left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks pretty good! A lot of boilerplate indeed and plenty of functions that might be a bit redundant, but it does fit in very nicely with other state types.

Just a shame that you mixed up the names analog and digital, but nothing some smart renaming won't fix!

@domire8
Copy link
Member Author

domire8 commented Mar 2, 2024

Hahaha that is because I really thought analog is 1/0 and digital anything😁 well.....

bpapaspyros
bpapaspyros previously approved these changes Mar 5, 2024
bpapaspyros
bpapaspyros previously approved these changes Mar 11, 2024
Copy link
Member

@eeberhard eeberhard left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a few nitpicks, and needs to be rebased with newer version, but I think this will be good to go!

source/state_representation/src/AnalogIOState.cpp Outdated Show resolved Hide resolved
source/state_representation/src/DigitalIOState.cpp Outdated Show resolved Hide resolved
Copy link
Member

@eeberhard eeberhard left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very cool

@domire8 domire8 merged commit 8f9cddf into develop Mar 26, 2024
@domire8 domire8 deleted the feat/io-cpp branch March 26, 2024 15:02
@github-actions github-actions bot locked and limited conversation to collaborators Mar 26, 2024
@domire8 domire8 linked an issue Mar 27, 2024 that may be closed by this pull request
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

GPIO states
3 participants