Skip to content

sdo: Define constants for all standardized abort codes #596

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

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

acolomb
Copy link
Member

@acolomb acolomb commented Jun 22, 2025

As discussed in #594, number literals in code for using the SDO abort protocol are bad for readability. Replace them with named constants.

Copy link

codecov bot commented Jun 22, 2025

Codecov Report

Attention: Patch coverage is 66.07143% with 19 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
canopen/sdo/client.py 11.76% 15 Missing ⚠️
canopen/sdo/server.py 42.85% 4 Missing ⚠️

📢 Thoughts on this report? Let us know!

@acolomb
Copy link
Member Author

acolomb commented Jun 22, 2025

This is just a start, without actually touching the places where the literals are in use. Can still already get started on bike-shedding for the constant names :-P

@acolomb acolomb added this to the v2.4.0 milestone Jun 30, 2025
@acolomb acolomb marked this pull request as ready for review July 13, 2025 12:46
@acolomb acolomb requested a review from sveinse July 13, 2025 12:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant