Repository navigation
Added Support For TCAN4x5x - #23
gi0rg0sPapamichail wants to merge 4 commits into
Conversation
|
I had a quick skim. Some points to address before review:
|
|
Apologies for the leftover LLM notes in the code—I had a few different
versions on my PC and mixed up the folders before submitting.
Why I opened this pull request: we are using *TCAN4551 CAN chips* to
control our ODrive controllers. Because Texas Instruments' original library
is written in ANSI C and isn't Arduino-compatible, we created our own
Arduino-compatible library for the TCAN modules:
*https://github.com/Hyperion-Robotics/TCAN4x5x/tree/main
<https://github.com/Hyperion-Robotics/TCAN4x5x/tree/main>* *(it's not on
the Arduino Library Manager just yet, but it will be soon cause i made the
fork today)*.
Tested board:
-
Arduino unoR3 using default hardware SPI pins.
-
Built-in automatic SPI pin multiplexing (TCAN4x5x(CS, MISO, MOSI, SCK))
for *ESP32, RP2040 / RP2350, STM32, and Teensy*.
Since I had some trouble understanding the existing wrappers (like
ODriveSTM32CAN.hpp), I worked with an LLM to help structure the wrapper for
the setup.
I’ve tested it with the sine wave CAN example, and everything worked
perfectly,including reading temperatures and current, setting loads, and
running trapezoidal movements. The goal of this fork is to add support for
the TCAN module.
I will soon give you the correct files without the llm notes and white
spaces noise
I am sorry for not checking before doing the fork
Στις Δευ 9 Νοε 2026 στις 3:27 μ.μ., ο/η samuelsadok <
***@***.***> έγραψε:
… *samuelsadok* left a comment (odriverobotics/ODriveArduino#23)
<#23 (comment)>
I had a quick skim. Some points to address before review:
- Which boards does this change support?
- The PR contains a lot of whitespace noise, please remove.
- Please describe what testing you did.
- Comments like // 1. Transmit function called by ODriveCAN using your
library's exact method names look like LLM left-overs. Those comments
are not in the analogous pre-existing glue headers, and they mention "your
library", which is unclear what that is. In general, the code should follow
conventions from the analogous files.
- If the code was LLM generated, please confirm that you have reviewed
it, have gained a good understanding of what it does, and have corrected
any mistakes you could find.
—
Reply to this email directly, view it on GitHub
<#23?email_source=notifications&email_token=BEPAXXTKEGY374E6CGCMA2T5YHA2LA5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTMNZUGEZDANBSGU2KM4TFMFZW63VGMF2XI2DPOKSWK5TFNZ2KYZTPN52GK4S7MNWGSY3L#issuecomment-6741204254>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/BEPAXXTESRVFDZUB6WA2RIT5YHA2LAVCNFSNUABFKJSXA33TNF2G64TZHM3DMMJWHEZTSMRXHNEXG43VMU5TMMRYGYZTEMJRHEY2C5QC>
.
Triage notifications, keep track of coding agent tasks and review pull
requests on the go with GitHub Mobile for iOS
<https://github.com/notifications/mobile/ios/BEPAXXT7NZLXCNTW4RLU3W35YHA2LA5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTMNZUGEZDANBSGU2KM4TFMFZW63VGMF2XI2DPOKSWK5TFNZ2KUZTPN52GK4S7NFXXG>
and Android
<https://github.com/notifications/mobile/android/BEPAXXVSVVX3U2BW537Q7O35YHA2LA5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTMNZUGEZDANBSGU2KM4TFMFZW63VGMF2XI2DPOKSWK5TFNZ2K4ZTPN52GK4S7MFXGI4TPNFSA>.
Download it today!
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
|
Hello, I just wanted to follow up on the PR. Have you had a chance to review the code? If there is still any unnecessary whitespace or formatting noise, could you please specify which files or sections need fixing? I've also performed additional tests with the TCAN4551 and ODrive controllers, and everything is working as expected. Thank you for your time! |
I see. In that case you still have flexibility to pick an API for your library. In that sense, I would strongly recommend to pick an API that already exists in the Arduino ecosystem, e.g. HardwareCAN. This way, it works with unchanged ODriveArduino and with some other existing libraries as well. If your goal is to make a TCAN4551 for the community, then something like that seems better (more scalable) than us merging a glue layer specifically for your library. (I had a quick look: The CAN glue layers we do already have in ODriveArduino are for CAN backends that already have traction in the Arduino ecosystem. Note that if you keep your library unchanged, you can of course still use it with ODriveArduino, you would just store the custom glue layer that your already made in a location next to your sketch. |
No description provided.