CANSparkMaxLowLevel

Struct CANSparkMaxLowLevel 

Source
#[repr(C)]
pub struct CANSparkMaxLowLevel { pub _base: MotorController, pub m_motorType: CANSparkMaxLowLevel_MotorType, pub m_sparkMaxHandle: *mut c_void, pub m_deviceID: c_int, }

Fields§

§_base: MotorController§m_motorType: CANSparkMaxLowLevel_MotorType§m_sparkMaxHandle: *mut c_void§m_deviceID: c_int

Implementations§

Source§

impl CANSparkMaxLowLevel

Source

pub unsafe fn GetFirmwareVersion(&mut self) -> u32

Source

pub unsafe fn GetFirmwareVersion1(&mut self, isDebugBuild: *mut bool) -> u32

Source

pub unsafe fn GetFirmwareString(&mut self) -> string

Source

pub unsafe fn GetSerialNumber(&mut self) -> vector

Source

pub unsafe fn GetDeviceId(&self) -> c_int

Source

pub unsafe fn GetInitialMotorType(&mut self) -> CANSparkMaxLowLevel_MotorType

Source

pub unsafe fn GetMotorType(&mut self) -> CANSparkMaxLowLevel_MotorType

Source

pub unsafe fn SetPeriodicFramePeriod( &mut self, frame: CANSparkMaxLowLevel_PeriodicFrame, periodMs: c_int, ) -> REVLibError

Source

pub unsafe fn SetControlFramePeriodMs(&mut self, periodMs: c_int)

Source

pub unsafe fn RestoreFactoryDefaults(&mut self, persist: bool) -> REVLibError

Source

pub unsafe fn EnableExternalUSBControl(enable: bool)

Source

pub unsafe fn SetEnable(enable: bool)

Source

pub unsafe fn GetPeriodicStatus0( &mut self, ) -> CANSparkMaxLowLevel_PeriodicStatus0

Source

pub unsafe fn GetPeriodicStatus1( &mut self, ) -> CANSparkMaxLowLevel_PeriodicStatus1

Source

pub unsafe fn GetPeriodicStatus2( &mut self, ) -> CANSparkMaxLowLevel_PeriodicStatus2

Source

pub unsafe fn SetFollow( &mut self, config: CANSparkMaxLowLevel_FollowConfig, ) -> REVLibError

Source

pub unsafe fn SetpointCommand( &mut self, value: f64, ctrl: CANSparkMaxLowLevel_ControlType, pidSlot: c_int, arbFeedforward: f64, arbFFUnits: c_int, ) -> REVLibError

Source

pub unsafe fn GetSafeFloat(&mut self, f: f32) -> f32

Trait Implementations§

Source§

impl Debug for CANSparkMaxLowLevel

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more