Just fetch the cogging ratio every time we need it

This commit is contained in:
Paul Guenette
2019-05-25 17:29:25 +02:00
parent dfca556185
commit 6654b3a375
3 changed files with 9 additions and 11 deletions
-4
View File
@@ -99,10 +99,6 @@ void Encoder::set_linear_count(int32_t count) {
cpu_exit_critical(prim);
}
void Encoder::cpr_changed_callback(){
axis_->controller_.config_.anticogging.cogging_ratio = config_.cpr / 3600.0f;
}
// Function that sets the CPR circular tracking encoder count to a desired 32-bit value.
// Note that this will get mod'ed down to [0, cpr)
void Encoder::set_circular_count(int32_t count, bool update_offset) {