lockin with enc sense working

This commit is contained in:
Oskar Weigl
2018-10-08 19:40:44 -07:00
parent 0556e27a84
commit 3a61b4a6ac
4 changed files with 19 additions and 4 deletions
+2
View File
@@ -43,6 +43,8 @@ bool Encoder::do_checks(){
// TODO: disable interrupt once we found the index
void Encoder::enc_index_cb() {
if (config_.use_index && !index_found_) {
if (config_.find_idx_on_lockin && axis_->lockin_state_ != Axis::LOCKIN_STATE_CONST_VEL)
return;
set_circular_count(0, false);
set_linear_count(0); // Avoid position control transient after search
if (config_.pre_calibrated) {