pub struct MultiDriver { /* private fields */ }
Expand description
Controller for moving multiple axes in a coordinated fashion.
Implementations§
Source§impl MultiDriver
impl MultiDriver
Sourcepub const MAX_DRIVERS: usize = 10usize
pub const MAX_DRIVERS: usize = 10usize
The maximum number of Driver
s that a MultiDriver
can manage when
compiled without the std
feature.
pub fn new() -> MultiDriver
Sourcepub fn push_driver(&mut self, driver: Driver)
pub fn push_driver(&mut self, driver: Driver)
Add a new Driver
to the list of synchronised axes managed by the
MultiDriver
.
§Panics
When compiling without the std
feature flag, the MultiDriver
can
only manage up to MultiDriver::MAX_DRIVERS
drivers.
pub fn drivers(&self) -> &[Driver]
pub fn drivers_mut(&mut self) -> &mut [Driver]
Sourcepub fn move_to(&mut self, positions: &[i64])
pub fn move_to(&mut self, positions: &[i64])
Set the target positions of all managed steppers.
§Panics
The number of managed steppers should be the same as the number of positions.
Sourcepub fn poll<D, C>(
&mut self,
devices: &mut [D],
clock: &C,
) -> Result<(), D::Error>where
D: Device,
C: SystemClock,
pub fn poll<D, C>(
&mut self,
devices: &mut [D],
clock: &C,
) -> Result<(), D::Error>where
D: Device,
C: SystemClock,
Sourcepub fn is_running(&self) -> bool
pub fn is_running(&self) -> bool
Are any of the managed steppers still running?
Auto Trait Implementations§
impl Freeze for MultiDriver
impl RefUnwindSafe for MultiDriver
impl Send for MultiDriver
impl Sync for MultiDriver
impl Unpin for MultiDriver
impl UnwindSafe for MultiDriver
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