Skip to content

Add optional CAN FD support - #5

Merged
jia-xie merged 3 commits into
jia-xie:mainfrom
umeow0716:main
Jun 9, 2026
Merged

Add optional CAN FD support#5
jia-xie merged 3 commits into
jia-xie:mainfrom
umeow0716:main

Conversation

@umeow0716

@umeow0716 umeow0716 commented May 29, 2026

Copy link
Copy Markdown
Contributor

Summary

Add an optional fd flag to enable CAN FD support for python-can / SocketCAN.

When fd=True, the controller initializes the CAN bus with FD support and sends messages with is_fd=True.

This PR also clears stale register cache entries before sending a write_register() command. This is related to #4, where control mode verification may fail after a power cycle because the motor firmware can take time to update and respond. Clearing the stale cache prevents a follow-up read from accidentally using an old cached value immediately after a write command.

Notes

The default is fd=False, so existing classic CAN behavior remains unchanged.

The cache clearing only removes the entry for the register being written, and does not clear the entire register cache.

@jia-xie
jia-xie merged commit e677fa9 into jia-xie:main Jun 9, 2026
1 check passed
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.

2 participants