fix formatting
This commit is contained in:
parent
3e859ecafb
commit
a632fc3a8e
|
@ -66,9 +66,8 @@ impl Controller {
|
||||||
let p = f64::from(self.parameters.kp) * error;
|
let p = f64::from(self.parameters.kp) * error;
|
||||||
|
|
||||||
// integral
|
// integral
|
||||||
if let Some(last_output_val) = self.last_output
|
if let Some(last_output_val) = self.last_output {
|
||||||
{
|
// anti integral windup
|
||||||
//anti integral windup
|
|
||||||
if last_output_val < self.parameters.output_max.into() && last_output_val > self.parameters.output_min.into()
|
if last_output_val < self.parameters.output_max.into() && last_output_val > self.parameters.output_min.into()
|
||||||
{
|
{
|
||||||
self.integral += error * time_delta;
|
self.integral += error * time_delta;
|
||||||
|
|
Loading…
Reference in New Issue