Change HallEffectAndPosition to proper naming
All of the templates assume the position variable is called encoder,
not position. I spent a while trying to figure out if the naming
should be the other way around, but I think 'encoder' is correct.
Change-Id: Icb0fa9a94bdea4ae3a43b947a073cc1f83ba5f4a
diff --git a/y2017/control_loops/superstructure/column/column.cc b/y2017/control_loops/superstructure/column/column.cc
index aaca601..8a3644e 100644
--- a/y2017/control_loops/superstructure/column/column.cc
+++ b/y2017/control_loops/superstructure/column/column.cc
@@ -118,19 +118,19 @@
}
turret_last_position_ = turret_position();
- Y_ << new_position.indexer.position, new_position.turret.position;
+ Y_ << new_position.indexer.encoder, new_position.turret.encoder;
Y_ += offset_;
loop_->Correct(Y_);
- indexer_history_[indexer_history_position_] = new_position.indexer.position;
+ indexer_history_[indexer_history_position_] = new_position.indexer.encoder;
indexer_history_position_ = (indexer_history_position_ + 1) % kHistoryLength;
indexer_dt_velocity_ =
- (new_position.indexer.position - indexer_last_position_) /
+ (new_position.indexer.encoder - indexer_last_position_) /
chrono::duration_cast<chrono::duration<double>>(
::aos::controls::kLoopFrequency)
.count();
- indexer_last_position_ = new_position.indexer.position;
+ indexer_last_position_ = new_position.indexer.encoder;
stuck_indexer_detector_->Correct(Y_);