#![allow(dead_code)]

#[derive(Debug, Clone)]
pub struct ConstantPower {
    pub max_speed: f64,
    pub dead_time_compensation_enable: bool,
    pub max_power: f64,
    pub power_hysteresis: PowerHysteresis,
    pub mode: PowerMode,
}

impl Default for ConstantPower {
    fn default() -> Self {
        Self {
            max_speed: 0.0,
            dead_time_compensation_enable: false,
            max_power: 0.0,
            power_hysteresis: PowerHysteresis::Percent5,
            mode: PowerMode::Disabled,
        }
    }
}

#[derive(Debug, Copy, Clone)]
pub enum PowerHysteresis {
    Percent5 = 0x0,
    Percent7_5 = 0x1,
    Percent10 = 0x2,
    Percent12_5 = 0x3,
}

#[derive(Debug, Copy, Clone)]
pub enum PowerMode {
    Disabled = 0x0,
    ClosedLoop = 0x1,
    PowerLimit = 0x2,
}
