don't treat watchdog_timeout == 0 as special case

this special treatment is now redundant with enable_watchdog
This commit is contained in:
Samuel Sadok
2020-05-20 11:57:04 +02:00
parent 62506fbbe1
commit 3d710a5385
2 changed files with 1 additions and 3 deletions
-2
View File
@@ -202,9 +202,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
if (watchdog_current_value_ > 0) {
+1 -1
View File
@@ -76,7 +76,7 @@ public:
float counts_per_step = 2.0f;
float watchdog_timeout = 0.0f; // [s] (0 disables watchdog)
float watchdog_timeout = 0.0f; // [s]
bool enable_watchdog = false;
// Defaults loaded from hw_config in load_configuration in main.cpp