pub struct InlineCurrentSensor<ADC, UP, VP, WP> {Show 16 fields
pub adc_handle: ADC,
pub adc_u_pin: Option<UP>,
pub adc_v_pin: Option<VP>,
pub adc_w_pin: Option<WP>,
pub iu: f32,
pub iv: f32,
pub iw: f32,
pub id: f32,
pub iq: f32,
pub offset_adc_u: f32,
pub offset_adc_v: f32,
pub offset_adc_w: f32,
pub gain_u: f32,
pub gain_v: f32,
pub gain_w: f32,
pub adc_conversion_factor: f32,
}Fields§
§adc_handle: ADC§adc_u_pin: Option<UP>§adc_v_pin: Option<VP>§adc_w_pin: Option<WP>§iu: f32§iv: f32§iw: f32§id: f32§iq: f32§offset_adc_u: f32§offset_adc_v: f32§offset_adc_w: f32§gain_u: f32§gain_v: f32§gain_w: f32§adc_conversion_factor: f32Trait Implementations§
Source§impl<ADC, UP, VP, WP> CurrentSensorTrait for InlineCurrentSensor<ADC, UP, VP, WP>
impl<ADC, UP, VP, WP> CurrentSensorTrait for InlineCurrentSensor<ADC, UP, VP, WP>
fn init<D>(&mut self, delay: &mut D) -> Result<(), ToyError>
fn read_adc( &mut self, ) -> Result<(Option<u32>, Option<u32>, Option<u32>), ToyError>
fn read_current(&mut self, angle_el: f32) -> Result<(f32, f32), ToyError>
fn cal_iq_id(&mut self, angle_el: f32)
fn get_phase_current(&mut self) -> PhaseCurrent
fn get_current(&mut self) -> (f32, f32)
fn get_offset(&mut self) -> (f32, f32, f32)
Auto Trait Implementations§
impl<ADC, UP, VP, WP> Freeze for InlineCurrentSensor<ADC, UP, VP, WP>
impl<ADC, UP, VP, WP> RefUnwindSafe for InlineCurrentSensor<ADC, UP, VP, WP>
impl<ADC, UP, VP, WP> Send for InlineCurrentSensor<ADC, UP, VP, WP>
impl<ADC, UP, VP, WP> Sync for InlineCurrentSensor<ADC, UP, VP, WP>
impl<ADC, UP, VP, WP> Unpin for InlineCurrentSensor<ADC, UP, VP, WP>
impl<ADC, UP, VP, WP> UnsafeUnpin for InlineCurrentSensor<ADC, UP, VP, WP>
impl<ADC, UP, VP, WP> UnwindSafe for InlineCurrentSensor<ADC, UP, VP, WP>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more