C++ CAN syntax help?

Hi

I can see a lot of dedicated procedures for communicating wia CAN from C++.

However I am not able to decode how I can send commands lige

set_linear_count = 0
or
reboot()

from C++

Whar are the syntx for doing so?

Hi! Is this on e.g. an Arduino, or from Linux or Windows or something like that?

Hi
Running on a Teensy 4.1.
Using FlexCAN_T4-master and the ODrive library.

Just checking, is this an ODrive S1/Pro/Micro, or a v3.6?

Hi
S1

Gotcha!

The reason I ask - set_linear_count is an old command from the v3.6 days, it’s no longer used. The equivalent would be to write to pos_estimate, which has a CAN message - Set_Absolute_Position. In Arduino, you would write e.g. odrive.setAbsolutePosition(0). For reboots, you would write odrive.reset(), or you can e.g. save configuration with odrive.reset(ODriveCAN::ResetAction::SaveConfiguration). You can see more information on the library reference here: Controlling ODrive from an Arduino via CAN — ODrive Documentation 0.6.11 documentation