mirror of
https://github.com/odriverobotics/ODrive.git
synced 2026-09-20 14:38:18 +08:00
Add watchdog enable option
This commit is contained in:
@@ -206,6 +206,7 @@ void Axis::watchdog_feed() {
|
||||
// @brief Check the watchdog timer for expiration. Also sets the watchdog error bit if expired.
|
||||
bool Axis::watchdog_check() {
|
||||
// reset value = 0 means watchdog disabled.
|
||||
if(!config_.enable_watchdog) return true;
|
||||
if (get_watchdog_reset() == 0) return true;
|
||||
|
||||
// explicit check here to ensure that we don't underflow back to UINT32_MAX
|
||||
|
||||
Reference in New Issue
Block a user