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

Feature Discussion: Strong-Typed Packet ID #613

Closed
Electro707 opened this issue Apr 14, 2023 · 2 comments
Closed

Feature Discussion: Strong-Typed Packet ID #613

Electro707 opened this issue Apr 14, 2023 · 2 comments

Comments

@Electro707
Copy link
Contributor

This is a change I can make thru a PR, but I want to get the community's opinion first before I create it.

I think that COMM_PACKET_ID and CAN_PACKET_ID should be strongly typed (by that I mean hard-coding the packet ID number in the enum), as those enum's are used by external applications (such as a Python application) which needs to know the packet ID number instead of looking thru the enum's order, and it will be a safeguard against any accidental changes/additions to the packet ID to prevent ID changes unless explicitly desired.

@casainho
Copy link

I also feel that need, as I am working on a small Python (CircuitPython) that runs on ESP32 and interfaces with VESC over UART.
I also feel that COMM_PACKET_ID and CAN_PACKET_ID should have hard-coded numbers on the enum.

@Electro707
Copy link
Contributor Author

Closing issue due to merged branch.

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

No branches or pull requests

2 participants