add python side enum, fix instant timout on 1st iteration

This commit is contained in:
Oskar Weigl
2019-03-18 21:09:46 -07:00
parent fe0486aa8d
commit e94230275e
2 changed files with 4 additions and 0 deletions
+3
View File
@@ -99,6 +99,9 @@ void Axis::update_watchdog_settings() {
} else {
watchdog_reset_value_ = static_cast<uint32_t>(config_.watchdog_timeout * current_meas_hz);
}
// Do a feed to avoid instant timeout
watchdog_feed();
}
// @brief (de)activates step/dir input
+1
View File
@@ -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