pub struct StepperMotorBuilder<STEP, DIR, DELAY>{ /* private fields */ }Expand description
Builder for creating StepperMotor instances.
Implementations§
Source§impl<STEP, DIR, DELAY> StepperMotorBuilder<STEP, DIR, DELAY>
impl<STEP, DIR, DELAY> StepperMotorBuilder<STEP, DIR, DELAY>
Sourcepub fn steps_per_revolution(self, steps: u16) -> Self
pub fn steps_per_revolution(self, steps: u16) -> Self
Set steps per revolution (base motor steps before microstepping).
Sourcepub fn microsteps(self, microsteps: Microsteps) -> Self
pub fn microsteps(self, microsteps: Microsteps) -> Self
Set microstep configuration.
Sourcepub fn gear_ratio(self, ratio: f32) -> Self
pub fn gear_ratio(self, ratio: f32) -> Self
Set gear ratio.
Sourcepub fn max_velocity(self, velocity: DegreesPerSec) -> Self
pub fn max_velocity(self, velocity: DegreesPerSec) -> Self
Set maximum velocity in degrees per second.
Sourcepub fn max_acceleration(self, acceleration: DegreesPerSecSquared) -> Self
pub fn max_acceleration(self, acceleration: DegreesPerSecSquared) -> Self
Set maximum acceleration in degrees per second squared.
Sourcepub fn invert_direction(self, invert: bool) -> Self
pub fn invert_direction(self, invert: bool) -> Self
Set direction inversion.
Sourcepub fn backlash_steps(self, steps: i64) -> Self
pub fn backlash_steps(self, steps: i64) -> Self
Set backlash compensation in steps.
Backlash is applied on direction changes to compensate for mechanical play.
Sourcepub fn from_motor_config(self, config: &MotorConfig) -> Self
pub fn from_motor_config(self, config: &MotorConfig) -> Self
Configure from a MotorConfig.
Sourcepub fn from_config(
self,
config: &SystemConfig,
motor_name: &str,
) -> Result<Self>
pub fn from_config( self, config: &SystemConfig, motor_name: &str, ) -> Result<Self>
Configure from SystemConfig by motor name.
Trait Implementations§
Auto Trait Implementations§
impl<STEP, DIR, DELAY> Freeze for StepperMotorBuilder<STEP, DIR, DELAY>
impl<STEP, DIR, DELAY> RefUnwindSafe for StepperMotorBuilder<STEP, DIR, DELAY>
impl<STEP, DIR, DELAY> Send for StepperMotorBuilder<STEP, DIR, DELAY>
impl<STEP, DIR, DELAY> Sync for StepperMotorBuilder<STEP, DIR, DELAY>
impl<STEP, DIR, DELAY> Unpin for StepperMotorBuilder<STEP, DIR, DELAY>
impl<STEP, DIR, DELAY> UnwindSafe for StepperMotorBuilder<STEP, DIR, DELAY>
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