I can successfully control two different odrive boards with my esp32 using the arduino library, and now it’s time to make it safe. I want to enable the watchdog feature in my code to limit the capacity for chaos and bloodshed. I don’t think this feature exists yet in the arduino library, but I tried to edit ODriveArduino.cpp by adding
It’s not causing any errors, but it’s not doing anything either. I have no idea what the opening "o " and "d " might do. I just copied the formating of the other features in the file and picked new letters. I have also edited ODriveArduino.h by adding
Thanks, I’m throwing new velocities at the odrive as fast as I can, so the watchdog is plenty fed. It’s enabling watchdog that I’m looking to do. I know I can save the configuration with watchdog enabled on boot, but I wanted to be able to explicitly activate the feature to be extra sure of safety.
I see now that the message I structured needs something on the firmware side to listen, so that’s why it’s not doing anything. I’m cycling onto another aspect of the project next week, but when I come back to this, if it’s still important, I’ll look at ascii_protocol.cpp and see about changing cmd_update_axis_wdg by adding something like axes[motor_number].enable_watchdog = True;
Seems harmless in the long term and would just re-activate the watchdog any time it got the u command you mentioned. Gets me the belt and suspenders safety I’m after. Assuming when I get around to this it does what I think.