#[derive(Debug)]
pub struct FwVersion {
pub major: u8,
pub minor: u8,
pub hw: [u8; 10],
pub uuid: [u8; 12],
}
#[derive(Debug)]
pub struct Values {
pub temp_fet: f32,
pub temp_motor: f32,
pub motor_current: f32,
pub input_current: f32,
pub id: f32,
pub iq: f32,
pub duty_cycle: f32,
pub rpm: f32,
pub input_voltage: f32,
pub amp_hours: f32,
pub amp_hours_charged: f32,
pub watt_hours: f32,
pub watt_hours_charged: f32,
pub tachometer: u32,
pub tachometer_abs: u32,
pub fault: Fault,
pub pid_pos: f32,
pub controller_id: u8,
}
#[derive(Debug)]
pub enum Fault {
None,
OverVoltage,
UnderVoltage,
Drv,
AbsOverCurrent,
OverTempFet,
OverTempMotor,
}