pid: never reset

This commit is contained in:
Astro 2020-10-13 23:55:22 +02:00
parent 150d6c2f87
commit a943308203
2 changed files with 2 additions and 10 deletions

View File

@ -302,11 +302,8 @@ fn main() -> ! {
let pid = &mut channels.channel_state(channel).pid; let pid = &mut channels.channel_state(channel).pid;
use command_parser::PidParameter::*; use command_parser::PidParameter::*;
match parameter { match parameter {
Target => { Target =>
pid.target = value; pid.target = value,
// reset pid.integral
pid.reset();
}
KP => KP =>
pid.parameters.kp = value as f32, pid.parameters.kp = value as f32,
KI => KI =>

View File

@ -81,11 +81,6 @@ impl Controller {
output output
} }
pub fn reset(&mut self) {
self.integral = 0.0;
self.last_input = None;
}
pub fn summary(&self, channel: usize) -> Summary { pub fn summary(&self, channel: usize) -> Summary {
Summary { Summary {
channel, channel,