Make subcomponent errors to always set relevant axis error; use do_checks and set_error

This commit is contained in:
Oskar Weigl
2018-05-10 06:56:13 -07:00
parent 08758c848d
commit a94096b64d
11 changed files with 68 additions and 53 deletions
+1 -1
View File
@@ -46,7 +46,7 @@ void Controller::set_current_setpoint(float current_setpoint) {
void Controller::start_anticogging_calibration() {
// Ensure the cogging map was correctly allocated earlier and that the motor is capable of calibrating
if (anticogging_.cogging_map != NULL && axis_->error_ == Axis::ERROR_NO_ERROR) {
if (anticogging_.cogging_map != NULL && axis_->error_ == Axis::ERROR_NONE) {
anticogging_.calib_anticogging = true;
}
}