#![allow(dead_code)]

use crate::hardware::mct8316a::closed_loop::{LowerPercentLimit, UpperPercentLimit};

#[derive(Debug, Clone)]
pub struct ConstantSpeed {
    pub speed_power_kp: f64,
    pub speed_power_ki: f64,
    pub speed_power_upper_limit: UpperPercentLimit,
    pub speed_power_lower_limit: LowerPercentLimit,
    pub mode: ClosedLoopMode,
}

impl Default for ConstantSpeed {
    fn default() -> Self {
        Self {
            speed_power_kp: 0.0,
            speed_power_ki: 0.0,
            speed_power_upper_limit: UpperPercentLimit::Percent100,
            speed_power_lower_limit: LowerPercentLimit::Percent0,
            mode: ClosedLoopMode::Disabled,
        }
    }
}

#[derive(Debug, Copy, Clone)]
pub enum ClosedLoopMode {
    Disabled = 0x0,
    SpeedLoop = 0x1,
    PowerLoop = 0x2,
}
