pub struct MotorData { /* private fields */ }Implementations§
Source§impl MotorData
impl MotorData
pub fn new(port: MotorPort) -> MotorData
pub fn port(&self) -> MotorPort
pub fn power(&self) -> i32
pub fn set_power(&mut self, power: i32)
pub fn apply_power(&self)
pub fn set_power_to_position_fixed(&mut self, target: i32)
pub fn set_power_to_position(&mut self, target: i32, dt: Duration)
pub fn position(&self) -> i32
pub fn configuration_applied(&self) -> bool
pub fn configure(&mut self, cfg: MotorType)
pub fn attempt_cfg_apply(&mut self)
pub fn stop(&mut self, brake: bool)
pub fn read(&mut self)
pub fn reset_position(&mut self)
Auto Trait Implementations§
impl Freeze for MotorData
impl RefUnwindSafe for MotorData
impl Send for MotorData
impl Sync for MotorData
impl Unpin for MotorData
impl UnwindSafe for MotorData
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