move vel_ramp_enable into controller.config

This commit is contained in:
Oskar Weigl
2019-10-07 16:19:30 -07:00
parent a37fa95e97
commit 27add54b3f
3 changed files with 6 additions and 3 deletions
+1 -1
View File
@@ -128,7 +128,7 @@ bool Controller::update(float pos_estimate, float vel_estimate, float* current_s
}
// Ramp rate limited velocity setpoint
if (config_.control_mode == CTRL_MODE_VELOCITY_CONTROL && vel_ramp_enable_) {
if (config_.control_mode == CTRL_MODE_VELOCITY_CONTROL && config_.vel_ramp_enable) {
float max_step_size = current_meas_period * config_.vel_ramp_rate;
float full_step = vel_ramp_target_ - vel_setpoint_;
float step;