fix formatting

This commit is contained in:
topquark12 2020-12-26 11:25:05 +08:00
parent 3e859ecafb
commit a632fc3a8e
1 changed files with 2 additions and 3 deletions

View File

@ -66,9 +66,8 @@ impl Controller {
let p = f64::from(self.parameters.kp) * error;
// integral
if let Some(last_output_val) = self.last_output
{
//anti integral windup
if let Some(last_output_val) = self.last_output {
// anti integral windup
if last_output_val < self.parameters.output_max.into() && last_output_val > self.parameters.output_min.into()
{
self.integral += error * time_delta;