move bandwith to config

This commit is contained in:
Oskar Weigl
2018-05-15 17:27:12 -07:00
parent c13bee09ed
commit 37e01b9865
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -230,7 +230,7 @@ static bool decode_hall(uint8_t hall_state, int32_t* hall_cnt) {
bool Encoder::update() {
// Calculate encoder pll gains
float pll_kp = 2.0f * bandwidth_; // basic conversion to discrete time
float pll_kp = 2.0f * config_.bandwidth; // basic conversion to discrete time
float pll_ki = 0.25f * (pll_kp * pll_kp); // Critically damped
// Check that we don't get problems with discrete time approximation