Fix float notation
This commit is contained in:
parent
d6356de1b6
commit
94726e1466
@ -34,8 +34,8 @@ void pid_init(struct pid_controller *pid, float k_deriv, float k_int, float k_p,
|
|||||||
pid->k_int = k_int;
|
pid->k_int = k_int;
|
||||||
pid->k_deriv = k_deriv;
|
pid->k_deriv = k_deriv;
|
||||||
pid->k_int_t = pid->k_int * pid->sample_period * 0.5f;
|
pid->k_int_t = pid->k_int * pid->sample_period * 0.5f;
|
||||||
pid->k_deriv_t = pid->k_deriv * 2.0f / (pid->sample_period + 2 * kd_tau);
|
pid->k_deriv_t = pid->k_deriv * 2.0f / (pid->sample_period + 2.0f * kd_tau);
|
||||||
pid->k_inv_deriv_t = (2 * kd_tau - sample_period) / (2 * kd_tau + sample_period);
|
pid->k_inv_deriv_t = (2.0f * kd_tau - sample_period) / (2.0f * kd_tau + sample_period);
|
||||||
pid->output_sat_max = output_sat_max;
|
pid->output_sat_max = output_sat_max;
|
||||||
pid->output_sat_min = output_sat_min;
|
pid->output_sat_min = output_sat_min;
|
||||||
pid->integral_max = integral_max;
|
pid->integral_max = integral_max;
|
||||||
|
Loading…
Reference in New Issue
Block a user