[][src]Struct adriftdev_pid::control::Module

pub struct Module {
    pub kp: PController,
    pub ki: IController,
    pub kd: DController,
    pub setpoint: f64,
    pub input: f64,
    pub output: f64,
    pub last_input: f64,
    pub max_output: f64,
    pub min_output: f64,
    pub time_change: Duration,
    pub last_time: Instant,
    pub sample_time: Duration,
}

Fields

kp: PControllerki: IControllerkd: DControllersetpoint: f64input: f64output: f64last_input: f64max_output: f64min_output: f64time_change: Durationlast_time: Instantsample_time: Duration

Methods

impl Module[src]

pub fn new(kp: PController, ki: IController, kd: DController) -> Module[src]

pub fn compute(&mut self) -> f64[src]

pub fn set_setpoint(&mut self, value: f64)[src]

pub fn set_output(&mut self, value: f64)[src]

Auto Trait Implementations

impl RefUnwindSafe for Module

impl Send for Module

impl Sync for Module

impl Unpin for Module

impl UnwindSafe for Module

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.