pid: never reset
This commit is contained in:
parent
150d6c2f87
commit
a943308203
@ -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 =>
|
||||||
|
@ -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,
|
||||||
|
Loading…
Reference in New Issue
Block a user