diff --git a/Firmware/MotorControl/axis.cpp b/Firmware/MotorControl/axis.cpp index d20f292a..80987c00 100644 --- a/Firmware/MotorControl/axis.cpp +++ b/Firmware/MotorControl/axis.cpp @@ -99,6 +99,9 @@ void Axis::update_watchdog_settings() { } else { watchdog_reset_value_ = static_cast(config_.watchdog_timeout * current_meas_hz); } + + // Do a feed to avoid instant timeout + watchdog_feed(); } // @brief (de)activates step/dir input diff --git a/tools/odrive/enums.py b/tools/odrive/enums.py index fc5439bd..d4425a21 100644 --- a/tools/odrive/enums.py +++ b/tools/odrive/enums.py @@ -27,6 +27,7 @@ class errors: ERROR_ENCODER_FAILED = 0x100 # Go to encoder.hpp for information, check odrvX.axisX.encoder.error for error value ERROR_CONTROLLER_FAILED = 0x200 ERROR_POS_CTRL_DURING_SENSORLESS = 0x400 + ERROR_WATCHDOG_TIMER_EXPIRED = 0x800 class motor: ERROR_NONE = 0